Documentation ¶
Overview ¶
Package Server is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterSubscribeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSubscribeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubscribeClient) error
- func RegisterSubscribeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSubscribeServer(s *grpc.Server, srv SubscribeServer)
- type Reply
- func (*Reply) Descriptor() ([]byte, []int)
- func (m *Reply) GetMessage() string
- func (*Reply) ProtoMessage()
- func (m *Reply) Reset()
- func (m *Reply) String() string
- func (m *Reply) XXX_DiscardUnknown()
- func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Reply) XXX_Merge(src proto.Message)
- func (m *Reply) XXX_Size() int
- func (m *Reply) XXX_Unmarshal(b []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetDecode() bool
- func (m *Request) GetLimit() uint32
- func (m *Request) GetUuid() string
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type SubscribeClient
- type SubscribeServer
- type UnimplementedSubscribeServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterSubscribeHandler ¶
func RegisterSubscribeHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSubscribeHandler registers the http handlers for service Subscribe to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSubscribeHandlerClient ¶
func RegisterSubscribeHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubscribeClient) error
RegisterSubscribeHandlerClient registers the http handlers for service Subscribe to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SubscribeClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SubscribeClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SubscribeClient" to call the correct interceptors.
func RegisterSubscribeHandlerFromEndpoint ¶
func RegisterSubscribeHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSubscribeHandlerFromEndpoint is same as RegisterSubscribeHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSubscribeServer ¶
func RegisterSubscribeServer(s *grpc.Server, srv SubscribeServer)
Types ¶
type Reply ¶
type Reply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Reply) Descriptor ¶
func (*Reply) GetMessage ¶
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) XXX_DiscardUnknown ¶
func (m *Reply) XXX_DiscardUnknown()
func (*Reply) XXX_Marshal ¶
func (*Reply) XXX_Unmarshal ¶
type Request ¶
type Request struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Decode bool `protobuf:"varint,2,opt,name=decode,proto3" json:"decode,omitempty"` Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type SubscribeClient ¶
type SubscribeClient interface { // Sends a greeting Query(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Reply, error) }
SubscribeClient is the client API for Subscribe service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSubscribeClient ¶
func NewSubscribeClient(cc *grpc.ClientConn) SubscribeClient
type SubscribeServer ¶
type SubscribeServer interface { // Sends a greeting Query(context.Context, *Request) (*Reply, error) }
SubscribeServer is the server API for Subscribe service.
type UnimplementedSubscribeServer ¶
type UnimplementedSubscribeServer struct { }
UnimplementedSubscribeServer can be embedded to have forward compatible implementations.