Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Func ¶
type Func struct { kvproto.UnimplementedKVServer GetFunc func(context.Context, *kvproto.GetRequest) (*kvproto.GetResponse, error) SetFunc func(context.Context, *kvproto.SetRequest) (*kvproto.SetResponse, error) }
Func is a function-based server.
func (*Func) Get ¶
func (f *Func) Get(ctx context.Context, req *kvproto.GetRequest) (*kvproto.GetResponse, error)
func (*Func) Set ¶
func (f *Func) Set(ctx context.Context, req *kvproto.SetRequest) (*kvproto.SetResponse, error)
type Server ¶
type Server struct { kvproto.UnimplementedKVServer // contains filtered or unexported fields }
Server implements an example KV store. Don't use this for production.
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, req *kvproto.GetRequest) (*kvproto.GetResponse, error)
func (*Server) Set ¶
func (s *Server) Set(ctx context.Context, req *kvproto.SetRequest) (*kvproto.SetResponse, error)
Click to show internal directories.
Click to hide internal directories.