monitor

package
v0.0.0-...-211e212 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InMemoryStoreCreator inMemoryStoreCreator

Functions

This section is empty.

Types

type InMemoryStore

type InMemoryStore struct {
	// contains filtered or unexported fields
}

func (*InMemoryStore) CAS

func (m *InMemoryStore) CAS(key string, value proto.Message) bool

func (*InMemoryStore) Context

func (m *InMemoryStore) Context() context.Context

func (*InMemoryStore) Delete

func (m *InMemoryStore) Delete(key string)

func (*InMemoryStore) Get

func (m *InMemoryStore) Get(key string) (proto.Message, bool)

func (*InMemoryStore) Keys

func (m *InMemoryStore) Keys() []string

func (*InMemoryStore) Len

func (m *InMemoryStore) Len() int

func (*InMemoryStore) Set

func (m *InMemoryStore) Set(key string, value proto.Message)

type KeyValueStore

type KeyValueStore interface {
	Context() context.Context
	Set(key string, value proto.Message)
	Delete(key string)
	Get(key string) (proto.Message, bool)
	CAS(key string, value proto.Message) bool
	Keys() []string
	Len() int
}

type MonitorServer

type MonitorServer struct {
	types.UnimplementedMonitorServer
	metrics.StatusController
	// contains filtered or unexported fields
}

func NewMonitorServer

func NewMonitorServer(
	ctx context.Context,
	conf config.MonitorSpec,
	storeCreator StoreCreator,
) *MonitorServer

func (*MonitorServer) GetBuckets

func (m *MonitorServer) GetBuckets(
	ctx context.Context,
	_ *types.Empty,
) (*types.BucketList, error)

func (*MonitorServer) GetKeys

func (m *MonitorServer) GetKeys(
	ctx context.Context,
	bucket *types.Bucket,
) (*types.KeyList, error)

func (*MonitorServer) GetMetric

func (m *MonitorServer) GetMetric(_ context.Context, key *types.Key) (*types.Metric, error)

func (*MonitorServer) Listen

func (m *MonitorServer) Listen(
	key *types.Key,
	srv types.Monitor_ListenServer,
) error

func (*MonitorServer) Stream

func (m *MonitorServer) Stream(
	srv types.Monitor_StreamServer,
) (streamError error)

func (*MonitorServer) Whois

type Receiver

type Receiver interface {
	Send(*anypb.Any) error
}

type StoreCreator

type StoreCreator interface {
	NewStore(ctx context.Context) KeyValueStore
}

Jump to

Keyboard shortcuts

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