Documentation ¶
Index ¶
- func RegisterMicroHandler(s server.Server, hdlr MicroHandler, opts ...server.HandlerOption) error
- func RegisterMicroServer(s *grpc.Server, srv MicroServer)
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (m *Message) GetBody() []byte
- func (m *Message) GetContentType() string
- func (m *Message) GetTopic() string
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) String() string
- func (m *Message) XXX_DiscardUnknown()
- func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Message) XXX_Merge(src proto.Message)
- func (m *Message) XXX_Size() int
- func (m *Message) XXX_Unmarshal(b []byte) error
- type MicroClient
- type MicroHandler
- type MicroServer
- type MicroService
- type Micro_StreamClient
- type Micro_StreamServer
- type Micro_StreamService
- type Micro_StreamStream
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetBody() []byte
- func (m *Request) GetContentType() string
- func (m *Request) GetEndpoint() string
- func (m *Request) GetService() 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 Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetBody() []byte
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterMicroHandler ¶
func RegisterMicroHandler(s server.Server, hdlr MicroHandler, opts ...server.HandlerOption) error
func RegisterMicroServer ¶
func RegisterMicroServer(s *grpc.Server, srv MicroServer)
Types ¶
type Message ¶
type Message struct { Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"` ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Message) Descriptor ¶
func (*Message) GetContentType ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) XXX_DiscardUnknown ¶
func (m *Message) XXX_DiscardUnknown()
func (*Message) XXX_Marshal ¶
func (*Message) XXX_Unmarshal ¶
type MicroClient ¶
type MicroClient interface { // Call allows a single request to be made Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) // Stream is a bidirectional stream Stream(ctx context.Context, opts ...grpc.CallOption) (Micro_StreamClient, error) // Publish publishes a message and returns an empty Message Publish(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) }
MicroClient is the client API for Micro service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMicroClient ¶
func NewMicroClient(cc *grpc.ClientConn) MicroClient
type MicroHandler ¶
type MicroHandler interface { // Call allows a single request to be made Call(context.Context, *Request, *Response) error // Stream is a bidirectional stream Stream(context.Context, Micro_StreamStream) error // Publish publishes a message and returns an empty Message Publish(context.Context, *Message, *Message) error }
type MicroServer ¶
type MicroServer interface { // Call allows a single request to be made Call(context.Context, *Request) (*Response, error) // Stream is a bidirectional stream Stream(Micro_StreamServer) error // Publish publishes a message and returns an empty Message Publish(context.Context, *Message) (*Message, error) }
MicroServer is the server API for Micro service.
type MicroService ¶
type MicroService interface { // Call allows a single request to be made Call(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error) // Stream is a bidirectional stream Stream(ctx context.Context, opts ...client.CallOption) (Micro_StreamService, error) // Publish publishes a message and returns an empty Message Publish(ctx context.Context, in *Message, opts ...client.CallOption) (*Message, error) }
func NewMicroService ¶
func NewMicroService(name string, c client.Client) MicroService
type Micro_StreamClient ¶
type Micro_StreamServer ¶
type Micro_StreamService ¶
type Micro_StreamStream ¶
type Request ¶
type Request struct { Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` Endpoint string `protobuf:"bytes,2,opt,name=endpoint,proto3" json:"endpoint,omitempty"` ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetContentType ¶
func (*Request) GetEndpoint ¶
func (*Request) GetService ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Response ¶
type Response struct { Body []byte `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
Click to show internal directories.
Click to hide internal directories.