Documentation ¶
Index ¶
- func NewClientConn(host string, certPEMBlock, keyPEMBlock []byte) (*grpc.ClientConn, error)
- type InMemoryClient
- func (c *InMemoryClient) CheckCapabilities(context.Context) error
- func (c *InMemoryClient) DownloadFile(ctx context.Context, key string, w io.Writer) (Metadata, error)
- func (c *InMemoryClient) FindFile(ctx context.Context, key string) (bool, error)
- func (c *InMemoryClient) UploadFile(ctx context.Context, key, filePath string, metadata Metadata) error
- type Interface
- type Metadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientConn ¶
func NewClientConn(host string, certPEMBlock, keyPEMBlock []byte) (*grpc.ClientConn, error)
NewClientConn creates a new gRPC client connected to host. tlsKey and tlsCert must be either both empty or non-empty.
Types ¶
type InMemoryClient ¶
type InMemoryClient struct {
// contains filtered or unexported fields
}
func NewInMemoryClient ¶
func NewInMemoryClient() *InMemoryClient
func (*InMemoryClient) CheckCapabilities ¶
func (c *InMemoryClient) CheckCapabilities(context.Context) error
func (*InMemoryClient) DownloadFile ¶
func (*InMemoryClient) UploadFile ¶
type Interface ¶
type Interface interface { CheckCapabilities(ctx context.Context) error UploadFile(ctx context.Context, key, filePath string, metadata Metadata) error FindFile(ctx context.Context, key string) (bool, error) DownloadFile(ctx context.Context, key string, w io.Writer) (Metadata, error) }
Interface is the remote cache client interface.
func NewClient ¶
func NewClient(cc *grpc.ClientConn) Interface
NewClient instantiates a client for a remote cache.
Click to show internal directories.
Click to hide internal directories.