grpc

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

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
}

func NewClient

func NewClient(ctx context.Context, addr string, opts ...grpc.DialOption) *Client

func (*Client) Close

func (c *Client) Close() error

func (*Client) Get

func (c *Client) Get(ctx context.Context, key string) ([]byte, distcache.ResultSource, error)

func (*Client) String

func (c *Client) String() string

type PeerCreator

type PeerCreator struct {
	DialOptions []grpc.DialOption
}

func (*PeerCreator) NewPeer

func (pc *PeerCreator) NewPeer(addr string) distcache.Peer

type Server

type Server struct {
	Cache *distcache.Cache
}

func (*Server) Get

func (s *Server) Get(ctx context.Context, req *pb.GetRequest) (*pb.GetResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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