Documentation
¶
Overview ¶
Package api is a generated protocol buffer package.
It is generated from these files:
api.proto
It has these top-level messages:
PingMessage AnnouncedVersionRequest AnnouncedVersionResponse
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterPingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PingClient) error
- func RegisterPingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPingServer(s *grpc.Server, srv PingServer)
- type AnnouncedVersionRequest
- func (*AnnouncedVersionRequest) Descriptor() ([]byte, []int)
- func (m *AnnouncedVersionRequest) GetEntity() string
- func (m *AnnouncedVersionRequest) GetNamespace() string
- func (*AnnouncedVersionRequest) ProtoMessage()
- func (m *AnnouncedVersionRequest) Reset()
- func (m *AnnouncedVersionRequest) String() string
- type AnnouncedVersionResponse
- type PingClient
- type PingMessage
- type PingServer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPingHandler ¶
RegisterPingHandler registers the http handlers for service Ping to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPingHandlerClient ¶
RegisterPingHandlerClient registers the http handlers for service Ping to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PingClient" doesn't go through the normal gRPC flow (creating a gRPC cache etc.) then it will be up to the passed in "PingClient" to call the correct interceptors.
func RegisterPingHandlerFromEndpoint ¶
func RegisterPingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPingHandlerFromEndpoint is same as RegisterPingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPingServer ¶
func RegisterPingServer(s *grpc.Server, srv PingServer)
Types ¶
type AnnouncedVersionRequest ¶
type AnnouncedVersionRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace" json:"namespace,omitempty"`
Entity string `protobuf:"bytes,2,opt,name=entity" json:"entity,omitempty"`
}
func (*AnnouncedVersionRequest) Descriptor ¶
func (*AnnouncedVersionRequest) Descriptor() ([]byte, []int)
func (*AnnouncedVersionRequest) GetEntity ¶
func (m *AnnouncedVersionRequest) GetEntity() string
func (*AnnouncedVersionRequest) GetNamespace ¶
func (m *AnnouncedVersionRequest) GetNamespace() string
func (*AnnouncedVersionRequest) ProtoMessage ¶
func (*AnnouncedVersionRequest) ProtoMessage()
func (*AnnouncedVersionRequest) Reset ¶
func (m *AnnouncedVersionRequest) Reset()
func (*AnnouncedVersionRequest) String ¶
func (m *AnnouncedVersionRequest) String() string
type AnnouncedVersionResponse ¶
type AnnouncedVersionResponse struct {
Currentversion string `protobuf:"bytes,1,opt,name=currentversion" json:"currentversion,omitempty"`
}
func (*AnnouncedVersionResponse) Descriptor ¶
func (*AnnouncedVersionResponse) Descriptor() ([]byte, []int)
func (*AnnouncedVersionResponse) GetCurrentversion ¶
func (m *AnnouncedVersionResponse) GetCurrentversion() string
func (*AnnouncedVersionResponse) ProtoMessage ¶
func (*AnnouncedVersionResponse) ProtoMessage()
func (*AnnouncedVersionResponse) Reset ¶
func (m *AnnouncedVersionResponse) Reset()
func (*AnnouncedVersionResponse) String ¶
func (m *AnnouncedVersionResponse) String() string
type PingClient ¶
type PingClient interface {
SayHello(ctx context.Context, in *PingMessage, opts ...grpc.CallOption) (*PingMessage, error)
GetAnnouncedVersion(ctx context.Context, in *AnnouncedVersionRequest, opts ...grpc.CallOption) (*AnnouncedVersionResponse, error)
}
func NewPingClient ¶
func NewPingClient(cc *grpc.ClientConn) PingClient
type PingMessage ¶
type PingMessage struct {
Greeting string `protobuf:"bytes,1,opt,name=greeting" json:"greeting,omitempty"`
}
func (*PingMessage) Descriptor ¶
func (*PingMessage) Descriptor() ([]byte, []int)
func (*PingMessage) GetGreeting ¶
func (m *PingMessage) GetGreeting() string
func (*PingMessage) ProtoMessage ¶
func (*PingMessage) ProtoMessage()
func (*PingMessage) Reset ¶
func (m *PingMessage) Reset()
func (*PingMessage) String ¶
func (m *PingMessage) String() string
type PingServer ¶
type PingServer interface {
SayHello(context.Context, *PingMessage) (*PingMessage, error)
GetAnnouncedVersion(context.Context, *AnnouncedVersionRequest) (*AnnouncedVersionResponse, error)
}
type Server ¶
type Server struct {
}
Server represents the gRPC server
func (*Server) GetAnnouncedVersion ¶
func (s *Server) GetAnnouncedVersion(ctx context.Context, in *AnnouncedVersionRequest) (*AnnouncedVersionResponse, error)
GetAnnouncedVersion generates response to a Ping request
func (*Server) SayHello ¶
func (s *Server) SayHello(ctx context.Context, in *PingMessage) (*PingMessage, error)
SayHello generates response to a Ping request
Source Files
¶
- api.pb.go
- api.pb.gw.go
- handler.go