client

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package client implements a gRPC client for the cache service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a gRPC cache service client.

func New

func New(conn *grpc.ClientConn) (p *Client)

New returns a new gRPC cache service client.

func (*Client) Close

func (a *Client) Close() error

Close tears down the ClientConn and all underlying connections.

func (*Client) Get

func (a *Client) Get(ctx context.Context, key string) (value []byte, err error)

Get retrieves a value from the cache service.

func (*Client) Set

func (a *Client) Set(ctx context.Context, key string, value []byte) error

Set stores a key value pair in the cache service.

Jump to

Keyboard shortcuts

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