cachesrv

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheServer

type CacheServer struct {
	metrics.StatusController
	types.UnimplementedCacheServer
	// contains filtered or unexported fields
}

func NewCacheServer

func NewCacheServer(
	ctx context.Context,
	cfg config.CacheSpec,
	opts ...CacheServerOption,
) *CacheServer

func (*CacheServer) Pull

func (s *CacheServer) Pull(
	ctx context.Context,
	req *types.PullRequest,
) (*types.CacheObject, error)

func (*CacheServer) Push

func (s *CacheServer) Push(
	ctx context.Context,
	req *types.PushRequest,
) (*types.Empty, error)

func (*CacheServer) Query

func (*CacheServer) StartMetricsProvider

func (s *CacheServer) StartMetricsProvider()

func (*CacheServer) Sync

type CacheServerOption

type CacheServerOption func(*CacheServerOptions)

func WithMonitorClient

func WithMonitorClient(
	client types.MonitorClient,
) CacheServerOption

func WithStorageProvider

func WithStorageProvider(sp storage.StorageProvider) CacheServerOption

type CacheServerOptions

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

func (*CacheServerOptions) Apply

func (o *CacheServerOptions) Apply(opts ...CacheServerOption)

Jump to

Keyboard shortcuts

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