1syntax = "proto3";
2
3option go_package = "github.com/hashicorp/vault/vault/activity";
4
5package activity;
6
7// EntityRecord is generated the first time an entity is active
8// each month.
9message EntityRecord {
10	string entity_id = 1;
11	string namespace_id = 2;
12	// using the Timestamp type would cost us an extra
13	// 4 bytes per record to store nanoseconds.
14	int64 timestamp = 3;
15}
16
17message LogFragment {
18	// hostname (or node ID?) where the fragment originated,
19	// used for debugging.
20	string originating_node = 1;
21
22	// active entities not yet in a log segment
23	repeated EntityRecord entities = 2;
24
25	// token counts not yet in a log segment,
26	// indexed by namespace ID
27	map<string,uint64> non_entity_tokens = 3;
28}
29
30message EntityActivityLog {
31	repeated EntityRecord entities = 1;
32}
33
34message TokenCount {
35	map<string,uint64> count_by_namespace_id = 1;
36}
37
38message LogFragmentResponse {
39}
40