Documentation
¶
Overview ¶
Package lifecycle is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterPingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PingServiceClient) error
- func RegisterPingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPingServiceServer(s *grpc.Server, srv PingServiceServer)
- type Ping
- func (*Ping) Descriptor() ([]byte, []int)
- func (this *Ping) Equal(that interface{}) bool
- func (m *Ping) GetMsg() string
- func (m *Ping) Marshal() (dAtA []byte, err error)
- func (m *Ping) MarshalTo(dAtA []byte) (int, error)
- func (*Ping) ProtoMessage()
- func (m *Ping) Reset()
- func (m *Ping) Size() (n int)
- func (m *Ping) String() string
- func (m *Ping) Unmarshal(dAtA []byte) error
- func (m *Ping) XXX_DiscardUnknown()
- func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Ping) XXX_Merge(src proto.Message)
- func (m *Ping) XXX_Size() int
- func (m *Ping) XXX_Unmarshal(b []byte) error
- type PingServiceClient
- type PingServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthPing = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPing = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterPingServiceHandler ¶
func RegisterPingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPingServiceHandler registers the http handlers for service PingService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPingServiceHandlerClient ¶
func RegisterPingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PingServiceClient) error
RegisterPingServiceHandlerClient registers the http handlers for service PingService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PingServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PingServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PingServiceClient" to call the correct interceptors.
func RegisterPingServiceHandlerFromEndpoint ¶
func RegisterPingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPingServiceHandlerFromEndpoint is same as RegisterPingServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPingServiceServer ¶
func RegisterPingServiceServer(s *grpc.Server, srv PingServiceServer)
Types ¶
type Ping ¶
type Ping struct { Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func NewPopulatedPing ¶
func (*Ping) Descriptor ¶
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) XXX_DiscardUnknown ¶
func (m *Ping) XXX_DiscardUnknown()
func (*Ping) XXX_Unmarshal ¶
type PingServiceClient ¶
type PingServiceClient interface {
GetPing(ctx context.Context, in *Ping, opts ...grpc.CallOption) (*Ping, error)
}
PingServiceClient is the client API for PingService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPingServiceClient ¶
func NewPingServiceClient(cc *grpc.ClientConn) PingServiceClient