Documentation
¶
Index ¶
- type CacheServer
- func (s *CacheServer) Pull(ctx context.Context, req *types.PullRequest) (*types.CacheObject, error)
- func (s *CacheServer) Push(ctx context.Context, req *types.PushRequest) (*types.Empty, error)
- func (s *CacheServer) Query(ctx context.Context, req *types.QueryRequest) (*types.QueryResponse, error)
- func (s *CacheServer) StartMetricsProvider()
- func (s *CacheServer) Sync(*types.SyncRequest, types.Cache_SyncServer) error
- type CacheServerOption
- type CacheServerOptions
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 (s *CacheServer) Query( ctx context.Context, req *types.QueryRequest, ) (*types.QueryResponse, error)
func (*CacheServer) StartMetricsProvider ¶
func (s *CacheServer) StartMetricsProvider()
func (*CacheServer) Sync ¶
func (s *CacheServer) Sync(*types.SyncRequest, types.Cache_SyncServer) error
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)
Click to show internal directories.
Click to hide internal directories.