Documentation
¶
Overview ¶
Package alfa is a generated protocol buffer package.
Alfa Service ¶
Alfa Service API consists of a single service which returns a message.
It is generated from these files:
alfa.proto
It has these top-level messages:
Message
Package alfa is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterAlfaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAlfaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlfaServiceClient) error
- func RegisterAlfaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAlfaServiceServer(s *grpc.Server, srv AlfaServiceServer)
- type AlfaServiceClient
- type AlfaServiceServer
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAlfaServiceHandler ¶
func RegisterAlfaServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAlfaServiceHandler registers the http handlers for service AlfaService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAlfaServiceHandlerClient ¶
func RegisterAlfaServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlfaServiceClient) error
RegisterAlfaServiceHandler registers the http handlers for service AlfaService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AlfaServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AlfaServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AlfaServiceClient" to call the correct interceptors.
func RegisterAlfaServiceHandlerFromEndpoint ¶
func RegisterAlfaServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAlfaServiceHandlerFromEndpoint is same as RegisterAlfaServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAlfaServiceServer ¶
func RegisterAlfaServiceServer(s *grpc.Server, srv AlfaServiceServer)
Types ¶
type AlfaServiceClient ¶
type AlfaServiceClient interface {
// Get method receives a simple message and returns it.
// The message posted as the id parameter will also be returned.
Get(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Message, error)
// Alfa method sets a simple message.
Set(ctx context.Context, in *Message, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Test(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*beta.Message, error)
}
func NewAlfaServiceClient ¶
func NewAlfaServiceClient(cc *grpc.ClientConn) AlfaServiceClient
type AlfaServiceServer ¶
type AlfaServiceServer interface {
// Get method receives a simple message and returns it.
// The message posted as the id parameter will also be returned.
Get(context.Context, *google_protobuf1.Empty) (*Message, error)
// Alfa method sets a simple message.
Set(context.Context, *Message) (*google_protobuf1.Empty, error)
Test(context.Context, *google_protobuf1.Empty) (*beta.Message, error)
}
type Message ¶
type Message struct {
// Id represents the message identifier.
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// The message to be sent.
Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
}
Message represents a simple message sent to the Alfa service.
func (*Message) Descriptor ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()