Documentation ¶
Index ¶
- func RegisterAPIHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAPIServer(s *grpc.Server, srv APIServer)
- type APIClient
- type APIServer
- type APIServerOptions
- type Version
- func (*Version) Descriptor() ([]byte, []int)
- func (m *Version) GetAdditional() string
- func (m *Version) GetMajor() uint32
- func (m *Version) GetMicro() uint32
- func (m *Version) GetMinor() uint32
- func (v *Version) Println()
- func (*Version) ProtoMessage()
- func (m *Version) Reset()
- func (m *Version) String() string
- func (v *Version) VersionString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAPIHandler ¶
RegisterAPIHandler registers the http handlers for service API to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAPIHandlerFromEndpoint ¶
func RegisterAPIHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAPIHandlerFromEndpoint is same as RegisterAPIHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
Types ¶
type APIClient ¶
type APIClient interface {
GetVersion(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Version, error)
}
func NewAPIClient ¶
func NewAPIClient(cc *grpc.ClientConn) APIClient
type APIServer ¶
func NewAPIServer ¶
func NewAPIServer(version *Version, options APIServerOptions) APIServer
NewAPIServer creates a new APIServer for the given Version.
type APIServerOptions ¶
type APIServerOptions struct {
DisableLogging bool
}
APIServerOptions are options when creating a new APIServer.
type Version ¶
type Version struct { Major uint32 `protobuf:"varint,1,opt,name=major" json:"major,omitempty"` Minor uint32 `protobuf:"varint,2,opt,name=minor" json:"minor,omitempty"` Micro uint32 `protobuf:"varint,3,opt,name=micro" json:"micro,omitempty"` Additional string `protobuf:"bytes,4,opt,name=additional" json:"additional,omitempty"` }
func GetServerVersion ¶
func GetServerVersion(clientConn *grpc.ClientConn) (*Version, error)
GetServerVersion gets the server *Version given the *grpc.ClientConn.
Click to show internal directories.
Click to hide internal directories.