activity

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2020 License: MPL-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_vault_activity_activity_log_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type EntityActivityLog

type EntityActivityLog struct {
	Entities []*EntityRecord `sentinel:"" protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"`
	// contains filtered or unexported fields
}

func (*EntityActivityLog) Descriptor deprecated

func (*EntityActivityLog) Descriptor() ([]byte, []int)

Deprecated: Use EntityActivityLog.ProtoReflect.Descriptor instead.

func (*EntityActivityLog) GetEntities

func (x *EntityActivityLog) GetEntities() []*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 {
	EntityID    string `sentinel:"" protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"`
	NamespaceID string `sentinel:"" 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 `sentinel:"" protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

EntityRecord is generated the first time an entity is active each month.

func (*EntityRecord) Descriptor deprecated

func (*EntityRecord) Descriptor() ([]byte, []int)

Deprecated: Use EntityRecord.ProtoReflect.Descriptor instead.

func (*EntityRecord) GetEntityID

func (x *EntityRecord) GetEntityID() string

func (*EntityRecord) GetNamespaceID

func (x *EntityRecord) GetNamespaceID() string

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 `sentinel:"" protobuf:"bytes,1,opt,name=originating_node,json=originatingNode,proto3" json:"originating_node,omitempty"`
	// active entities not yet in a log segment
	Entities []*EntityRecord `sentinel:"" protobuf:"bytes,2,rep,name=entities,proto3" json:"entities,omitempty"`
	// token counts not yet in a log segment,
	// indexed by namespace ID
	NonEntityTokens map[string]uint64 `` /* 209-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) GetEntities

func (x *LogFragment) GetEntities() []*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 NamespaceRecord

type NamespaceRecord struct {
	NamespaceID     string `json:"namespace_id"`
	Entities        uint64 `json:"entities"`
	NonEntityTokens uint64 `json:"non_entity_tokens"`
}

About 66 bytes per record: {"namespace_id":"xxxxx","entities":1234,"non_entity_tokens":1234}, = approx 7900 namespaces in 512KiB So one storage entry is fine (for now).

type PrecomputedQuery

type PrecomputedQuery struct {
	StartTime  time.Time
	EndTime    time.Time
	Namespaces []*NamespaceRecord `json:"namespaces"`
}

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 (s *PrecomputedQueryStore) DeleteQueriesBefore(ctx context.Context, retentionThreshold time.Time) error

func (*PrecomputedQueryStore) Get

func (s *PrecomputedQueryStore) Get(ctx context.Context, startTime, endTime time.Time) (*PrecomputedQuery, error)

func (*PrecomputedQueryStore) Put

func (*PrecomputedQueryStore) QueriesAvailable

func (s *PrecomputedQueryStore) QueriesAvailable(ctx context.Context) (bool, error)

type TokenCount

type TokenCount struct {
	CountByNamespaceID map[string]uint64 `` /* 220-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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL