activity

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 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 CountsRecord added in v1.10.0

type CountsRecord struct {
	EntityClients    int `json:"entity_clients"`
	NonEntityClients int `json:"non_entity_clients"`
}

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"`
	// 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) 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 (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 `` /* 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

Jump to

Keyboard shortcuts

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