Documentation
¶
Index ¶
- Variables
- type CountsRecord
- type EntityActivityLog
- func (*EntityActivityLog) Descriptor() ([]byte, []int)deprecated
- func (x *EntityActivityLog) GetClients() []*EntityRecord
- func (*EntityActivityLog) ProtoMessage()
- func (x *EntityActivityLog) ProtoReflect() protoreflect.Message
- func (x *EntityActivityLog) Reset()
- func (x *EntityActivityLog) String() string
- type EntityRecord
- func (*EntityRecord) Descriptor() ([]byte, []int)deprecated
- func (x *EntityRecord) GetClientID() string
- func (x *EntityRecord) GetClientType() string
- func (x *EntityRecord) GetMountAccessor() string
- func (x *EntityRecord) GetNamespaceID() string
- func (x *EntityRecord) GetNonEntity() bool
- func (x *EntityRecord) GetTimestamp() int64
- func (*EntityRecord) ProtoMessage()
- func (x *EntityRecord) ProtoReflect() protoreflect.Message
- func (x *EntityRecord) Reset()
- func (x *EntityRecord) String() string
- type LogFragment
- func (*LogFragment) Descriptor() ([]byte, []int)deprecated
- func (x *LogFragment) GetClients() []*EntityRecord
- func (x *LogFragment) GetNonEntityTokens() map[string]uint64
- func (x *LogFragment) GetOriginatingNode() string
- func (*LogFragment) ProtoMessage()
- func (x *LogFragment) ProtoReflect() protoreflect.Message
- func (x *LogFragment) Reset()
- func (x *LogFragment) String() string
- type LogFragmentResponse
- type MonthRecord
- type MonthlyNamespaceRecord
- type MountRecord
- type NamespaceRecord
- type NewClientRecord
- type PrecomputedQuery
- type PrecomputedQueryStore
- func (s *PrecomputedQueryStore) DeleteQueriesBefore(ctx context.Context, retentionThreshold time.Time) error
- func (s *PrecomputedQueryStore) Get(ctx context.Context, startTime, endTime time.Time) (*PrecomputedQuery, error)
- func (s *PrecomputedQueryStore) Put(ctx context.Context, p *PrecomputedQuery) error
- func (s *PrecomputedQueryStore) QueriesAvailable(ctx context.Context) (bool, error)
- type TokenCount
Constants ¶
This section is empty.
Variables ¶
var File_vault_activity_activity_log_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CountsRecord ¶ added in v1.10.0
type EntityActivityLog ¶
type EntityActivityLog struct {
Clients []*EntityRecord `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"`
// contains filtered or unexported fields
}
This activity log stores records for both clients with entities and clients without entities
func (*EntityActivityLog) Descriptor
deprecated
func (*EntityActivityLog) Descriptor() ([]byte, []int)
Deprecated: Use EntityActivityLog.ProtoReflect.Descriptor instead.
func (*EntityActivityLog) GetClients ¶ added in v1.9.0
func (x *EntityActivityLog) GetClients() []*EntityRecord
func (*EntityActivityLog) ProtoMessage ¶
func (*EntityActivityLog) ProtoMessage()
func (*EntityActivityLog) ProtoReflect ¶
func (x *EntityActivityLog) ProtoReflect() protoreflect.Message
func (*EntityActivityLog) Reset ¶
func (x *EntityActivityLog) Reset()
func (*EntityActivityLog) String ¶
func (x *EntityActivityLog) String() string
type EntityRecord ¶
type EntityRecord struct {
ClientID string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
NamespaceID string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceID,proto3" json:"namespace_id,omitempty"`
// using the Timestamp type would cost us an extra
// 4 bytes per record to store nanoseconds.
Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// non_entity records whether the given EntityRecord is
// for a TWE or an entity-bound token.
NonEntity bool `protobuf:"varint,4,opt,name=non_entity,json=nonEntity,proto3" json:"non_entity,omitempty"`
// MountAccessor is the auth mount accessor of the token used to perform the
// activity.
MountAccessor string `protobuf:"bytes,5,opt,name=mount_accessor,json=mountAccessor,proto3" json:"mount_accessor,omitempty"`
// client_type identifies the source of the entity record (entity,
// non-entity, acme, etc.)
ClientType string `protobuf:"bytes,6,opt,name=client_type,json=clientType,proto3" json:"client_type,omitempty"`
// contains filtered or unexported fields
}
EntityRecord is generated the first time a client is active each month. This can store clients associated with entities or nonEntity clients, and really is a ClientRecord, not specifically an EntityRecord.
func (*EntityRecord) Descriptor
deprecated
func (*EntityRecord) Descriptor() ([]byte, []int)
Deprecated: Use EntityRecord.ProtoReflect.Descriptor instead.
func (*EntityRecord) GetClientID ¶ added in v1.9.0
func (x *EntityRecord) GetClientID() string
func (*EntityRecord) GetClientType ¶ added in v1.14.0
func (x *EntityRecord) GetClientType() string
func (*EntityRecord) GetMountAccessor ¶ added in v1.10.0
func (x *EntityRecord) GetMountAccessor() string
func (*EntityRecord) GetNamespaceID ¶
func (x *EntityRecord) GetNamespaceID() string
func (*EntityRecord) GetNonEntity ¶ added in v1.9.0
func (x *EntityRecord) GetNonEntity() bool
func (*EntityRecord) GetTimestamp ¶
func (x *EntityRecord) GetTimestamp() int64
func (*EntityRecord) ProtoMessage ¶
func (*EntityRecord) ProtoMessage()
func (*EntityRecord) ProtoReflect ¶
func (x *EntityRecord) ProtoReflect() protoreflect.Message
func (*EntityRecord) Reset ¶
func (x *EntityRecord) Reset()
func (*EntityRecord) String ¶
func (x *EntityRecord) String() string
type LogFragment ¶
type LogFragment struct {
// hostname (or node ID?) where the fragment originated,
// used for debugging.
OriginatingNode string `protobuf:"bytes,1,opt,name=originating_node,json=originatingNode,proto3" json:"originating_node,omitempty"`
// active clients not yet in a log segment
Clients []*EntityRecord `protobuf:"bytes,2,rep,name=clients,proto3" json:"clients,omitempty"`
// token counts not yet in a log segment,
// indexed by namespace ID
NonEntityTokens map[string]uint64 `` /* 197-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*LogFragment) Descriptor
deprecated
func (*LogFragment) Descriptor() ([]byte, []int)
Deprecated: Use LogFragment.ProtoReflect.Descriptor instead.
func (*LogFragment) GetClients ¶ added in v1.9.0
func (x *LogFragment) GetClients() []*EntityRecord
func (*LogFragment) GetNonEntityTokens ¶
func (x *LogFragment) GetNonEntityTokens() map[string]uint64
func (*LogFragment) GetOriginatingNode ¶
func (x *LogFragment) GetOriginatingNode() string
func (*LogFragment) ProtoMessage ¶
func (*LogFragment) ProtoMessage()
func (*LogFragment) ProtoReflect ¶
func (x *LogFragment) ProtoReflect() protoreflect.Message
func (*LogFragment) Reset ¶
func (x *LogFragment) Reset()
func (*LogFragment) String ¶
func (x *LogFragment) String() string
type LogFragmentResponse ¶
type LogFragmentResponse struct {
// contains filtered or unexported fields
}
func (*LogFragmentResponse) Descriptor
deprecated
func (*LogFragmentResponse) Descriptor() ([]byte, []int)
Deprecated: Use LogFragmentResponse.ProtoReflect.Descriptor instead.
func (*LogFragmentResponse) ProtoMessage ¶
func (*LogFragmentResponse) ProtoMessage()
func (*LogFragmentResponse) ProtoReflect ¶
func (x *LogFragmentResponse) ProtoReflect() protoreflect.Message
func (*LogFragmentResponse) Reset ¶
func (x *LogFragmentResponse) Reset()
func (*LogFragmentResponse) String ¶
func (x *LogFragmentResponse) String() string
type MonthRecord ¶ added in v1.10.0
type MonthRecord struct {
Timestamp int64 `json:"timestamp"`
Counts *CountsRecord `json:"counts"`
Namespaces []*MonthlyNamespaceRecord `json:"namespaces"`
NewClients *NewClientRecord `json:"new_clients"`
}
type MonthlyNamespaceRecord ¶ added in v1.10.0
type MonthlyNamespaceRecord struct {
NamespaceID string `json:"namespace_id"`
Counts *CountsRecord `json:"counts"`
Mounts []*MountRecord `json:"mounts"`
}
type MountRecord ¶ added in v1.10.0
type MountRecord struct {
MountPath string `json:"mount_path"`
Counts *CountsRecord `json:"counts"`
}
type NamespaceRecord ¶
type NamespaceRecord struct {
NamespaceID string `json:"namespace_id"`
Entities uint64 `json:"entities"`
NonEntityTokens uint64 `json:"non_entity_tokens"`
Mounts []*MountRecord `json:"mounts"`
}
type NewClientRecord ¶ added in v1.10.0
type NewClientRecord struct {
Counts *CountsRecord `json:"counts"`
Namespaces []*MonthlyNamespaceRecord `json:"namespaces"`
}
type PrecomputedQuery ¶
type PrecomputedQuery struct {
StartTime time.Time
EndTime time.Time
Namespaces []*NamespaceRecord `json:"namespaces"`
Months []*MonthRecord `json:"months"`
}
type PrecomputedQueryStore ¶
type PrecomputedQueryStore struct {
// contains filtered or unexported fields
}
func NewPrecomputedQueryStore ¶
func NewPrecomputedQueryStore(logger log.Logger, view logical.Storage, retentionMonths int) *PrecomputedQueryStore
The query store should be initialized with a view to the subdirectory it should use, like "queries".
func (*PrecomputedQueryStore) DeleteQueriesBefore ¶
func (*PrecomputedQueryStore) Get ¶
func (s *PrecomputedQueryStore) Get(ctx context.Context, startTime, endTime time.Time) (*PrecomputedQuery, error)
func (*PrecomputedQueryStore) Put ¶
func (s *PrecomputedQueryStore) Put(ctx context.Context, p *PrecomputedQuery) error
func (*PrecomputedQueryStore) QueriesAvailable ¶
func (s *PrecomputedQueryStore) QueriesAvailable(ctx context.Context) (bool, error)
type TokenCount ¶
type TokenCount struct {
CountByNamespaceID map[string]uint64 `` /* 208-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*TokenCount) Descriptor
deprecated
func (*TokenCount) Descriptor() ([]byte, []int)
Deprecated: Use TokenCount.ProtoReflect.Descriptor instead.
func (*TokenCount) GetCountByNamespaceID ¶
func (x *TokenCount) GetCountByNamespaceID() map[string]uint64
func (*TokenCount) ProtoMessage ¶
func (*TokenCount) ProtoMessage()
func (*TokenCount) ProtoReflect ¶
func (x *TokenCount) ProtoReflect() protoreflect.Message
func (*TokenCount) Reset ¶
func (x *TokenCount) Reset()
func (*TokenCount) String ¶
func (x *TokenCount) String() string