Documentation
¶
Overview ¶
Package cache provides cache service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct { cachepb.UnimplementedCacheServiceServer // contains filtered or unexported fields }
Cache represents key-value cache.
func (*Cache) Get ¶
Get gets key-value for requested key. It returns codes.NotFound if value not found in cache.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a client to access cache service via gRPC.
func NewClient ¶
NewClient creates new client to access cache service serving on address. cache service will be sharded by key.
type Config ¶
type Config struct { // MaxBytes is maximum number of bytes used for cache. MaxBytes int64 Bucket *storage.BucketHandle }
Config is a configuration for Cache.
type LocalClient ¶
type LocalClient struct {
pb.CacheServiceServer
}
LocalClient is an adaptor to make CacheServiceServer as CacheServiceClient, ignoring any grpc.CallOption. TODO: use localhost server? https://github.com/grpc/grpc-go/issues/520
Click to show internal directories.
Click to hide internal directories.