Documentation ¶
Overview ¶
Package serverpb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterServerHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerClient) error
- func RegisterServerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterServerServer(s *grpc.Server, srv ServerServer)
- type ServerClient
- type ServerServer
- type VersionRequest
- func (*VersionRequest) Descriptor() ([]byte, []int)
- func (*VersionRequest) ProtoMessage()
- func (m *VersionRequest) Reset()
- func (m *VersionRequest) String() string
- func (this *VersionRequest) Validate() error
- func (m *VersionRequest) XXX_DiscardUnknown()
- func (m *VersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VersionRequest) XXX_Merge(src proto.Message)
- func (m *VersionRequest) XXX_Size() int
- func (m *VersionRequest) XXX_Unmarshal(b []byte) error
- type VersionResponse
- func (*VersionResponse) Descriptor() ([]byte, []int)
- func (m *VersionResponse) GetPmmManagedCommit() string
- func (m *VersionResponse) GetTimestamp() *timestamp.Timestamp
- func (m *VersionResponse) GetVersion() string
- func (*VersionResponse) ProtoMessage()
- func (m *VersionResponse) Reset()
- func (m *VersionResponse) String() string
- func (this *VersionResponse) Validate() error
- func (m *VersionResponse) XXX_DiscardUnknown()
- func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *VersionResponse) XXX_Merge(src proto.Message)
- func (m *VersionResponse) XXX_Size() int
- func (m *VersionResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterServerHandler ¶
RegisterServerHandler registers the http handlers for service Server to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterServerHandlerClient ¶
func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServerClient) error
RegisterServerHandlerClient registers the http handlers for service Server to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServerClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServerClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ServerClient" to call the correct interceptors.
func RegisterServerHandlerFromEndpoint ¶
func RegisterServerHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterServerHandlerFromEndpoint is same as RegisterServerHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterServerServer ¶
func RegisterServerServer(s *grpc.Server, srv ServerServer)
Types ¶
type ServerClient ¶
type ServerClient interface { // Version returns PMM Server version. Version(ctx context.Context, in *VersionRequest, opts ...grpc.CallOption) (*VersionResponse, error) }
ServerClient is the client API for Server service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServerClient ¶
func NewServerClient(cc *grpc.ClientConn) ServerClient
type ServerServer ¶
type ServerServer interface { // Version returns PMM Server version. Version(context.Context, *VersionRequest) (*VersionResponse, error) }
ServerServer is the server API for Server service.
type VersionRequest ¶
type VersionRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VersionRequest) Descriptor ¶
func (*VersionRequest) Descriptor() ([]byte, []int)
func (*VersionRequest) ProtoMessage ¶
func (*VersionRequest) ProtoMessage()
func (*VersionRequest) Reset ¶
func (m *VersionRequest) Reset()
func (*VersionRequest) String ¶
func (m *VersionRequest) String() string
func (*VersionRequest) Validate ¶
func (this *VersionRequest) Validate() error
func (*VersionRequest) XXX_DiscardUnknown ¶
func (m *VersionRequest) XXX_DiscardUnknown()
func (*VersionRequest) XXX_Marshal ¶
func (m *VersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VersionRequest) XXX_Merge ¶
func (m *VersionRequest) XXX_Merge(src proto.Message)
func (*VersionRequest) XXX_Size ¶
func (m *VersionRequest) XXX_Size() int
func (*VersionRequest) XXX_Unmarshal ¶
func (m *VersionRequest) XXX_Unmarshal(b []byte) error
type VersionResponse ¶
type VersionResponse struct { // Full PMM version. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // Build timestamp. Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // pmm-managed commit. PmmManagedCommit string `protobuf:"bytes,3,opt,name=pmm_managed_commit,json=pmmManagedCommit,proto3" json:"pmm_managed_commit,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*VersionResponse) Descriptor ¶
func (*VersionResponse) Descriptor() ([]byte, []int)
func (*VersionResponse) GetPmmManagedCommit ¶
func (m *VersionResponse) GetPmmManagedCommit() string
func (*VersionResponse) GetTimestamp ¶
func (m *VersionResponse) GetTimestamp() *timestamp.Timestamp
func (*VersionResponse) GetVersion ¶
func (m *VersionResponse) GetVersion() string
func (*VersionResponse) ProtoMessage ¶
func (*VersionResponse) ProtoMessage()
func (*VersionResponse) Reset ¶
func (m *VersionResponse) Reset()
func (*VersionResponse) String ¶
func (m *VersionResponse) String() string
func (*VersionResponse) Validate ¶
func (this *VersionResponse) Validate() error
func (*VersionResponse) XXX_DiscardUnknown ¶
func (m *VersionResponse) XXX_DiscardUnknown()
func (*VersionResponse) XXX_Marshal ¶
func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VersionResponse) XXX_Merge ¶
func (m *VersionResponse) XXX_Merge(src proto.Message)
func (*VersionResponse) XXX_Size ¶
func (m *VersionResponse) XXX_Size() int
func (*VersionResponse) XXX_Unmarshal ¶
func (m *VersionResponse) XXX_Unmarshal(b []byte) error