Documentation
¶
Overview ¶
Package pb is a generated protocol buffer package.
It is generated from these files:
example/pb/app.proto
It has these top-level messages:
KeyValMessage
Package pb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterKeyValHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterKeyValHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterKeyValServer(s *grpc.Server, srv KeyValServer)
- type KeyValClient
- type KeyValMessage
- type KeyValServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterKeyValHandler ¶
RegisterKeyValHandler registers the http handlers for service KeyVal to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterKeyValHandlerFromEndpoint ¶
func RegisterKeyValHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterKeyValHandlerFromEndpoint is same as RegisterKeyValHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterKeyValServer ¶
func RegisterKeyValServer(s *grpc.Server, srv KeyValServer)
Types ¶
type KeyValClient ¶
type KeyValClient interface {
KeyValCreate(ctx context.Context, in *KeyValMessage, opts ...grpc.CallOption) (*KeyValMessage, error)
KeyValRead(ctx context.Context, in *KeyValMessage, opts ...grpc.CallOption) (*KeyValMessage, error)
KeyValUpdate(ctx context.Context, in *KeyValMessage, opts ...grpc.CallOption) (*KeyValMessage, error)
KeyValDelete(ctx context.Context, in *KeyValMessage, opts ...grpc.CallOption) (*KeyValMessage, error)
}
func NewKeyValClient ¶
func NewKeyValClient(cc *grpc.ClientConn) KeyValClient
type KeyValMessage ¶
type KeyValMessage struct {
Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}
func (*KeyValMessage) Descriptor ¶
func (*KeyValMessage) Descriptor() ([]byte, []int)
func (*KeyValMessage) GetKey ¶
func (m *KeyValMessage) GetKey() string
func (*KeyValMessage) GetValue ¶
func (m *KeyValMessage) GetValue() string
func (*KeyValMessage) ProtoMessage ¶
func (*KeyValMessage) ProtoMessage()
func (*KeyValMessage) Reset ¶
func (m *KeyValMessage) Reset()
func (*KeyValMessage) String ¶
func (m *KeyValMessage) String() string
type KeyValServer ¶
type KeyValServer interface {
KeyValCreate(context.Context, *KeyValMessage) (*KeyValMessage, error)
KeyValRead(context.Context, *KeyValMessage) (*KeyValMessage, error)
KeyValUpdate(context.Context, *KeyValMessage) (*KeyValMessage, error)
KeyValDelete(context.Context, *KeyValMessage) (*KeyValMessage, error)
}
Click to show internal directories.
Click to hide internal directories.