Documentation ¶
Index ¶
- Variables
- func RegisterListenServer(s *grpc.Server, srv ListenServer)
- type Header
- func (*Header) Descriptor() ([]byte, []int)
- func (m *Header) GetKey() string
- func (m *Header) GetVal() string
- func (m *Header) Marshal() (dAtA []byte, err error)
- func (m *Header) MarshalTo(dAtA []byte) (int, error)
- func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Header) ProtoMessage()
- func (m *Header) Reset()
- func (m *Header) Size() (n int)
- func (m *Header) String() string
- func (m *Header) Unmarshal(dAtA []byte) error
- func (m *Header) XXX_DiscardUnknown()
- func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Header) XXX_Merge(src proto.Message)
- func (m *Header) XXX_Size() int
- func (m *Header) XXX_Unmarshal(b []byte) error
- type ListenClient
- type ListenServer
- type RouteReq
- func (*RouteReq) Descriptor() ([]byte, []int)
- func (m *RouteReq) GetMeta() []*Header
- func (m *RouteReq) GetNod() string
- func (m *RouteReq) GetReqBody() []byte
- func (m *RouteReq) GetService() string
- func (m *RouteReq) GetToken() string
- func (m *RouteReq) Marshal() (dAtA []byte, err error)
- func (m *RouteReq) MarshalTo(dAtA []byte) (int, error)
- func (m *RouteReq) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RouteReq) ProtoMessage()
- func (m *RouteReq) Reset()
- func (m *RouteReq) Size() (n int)
- func (m *RouteReq) String() string
- func (m *RouteReq) Unmarshal(dAtA []byte) error
- func (m *RouteReq) XXX_DiscardUnknown()
- func (m *RouteReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RouteReq) XXX_Merge(src proto.Message)
- func (m *RouteReq) XXX_Size() int
- func (m *RouteReq) XXX_Unmarshal(b []byte) error
- type RouteRes
- func (*RouteRes) Descriptor() ([]byte, []int)
- func (m *RouteRes) GetResBody() []byte
- func (m *RouteRes) Marshal() (dAtA []byte, err error)
- func (m *RouteRes) MarshalTo(dAtA []byte) (int, error)
- func (m *RouteRes) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RouteRes) ProtoMessage()
- func (m *RouteRes) Reset()
- func (m *RouteRes) Size() (n int)
- func (m *RouteRes) String() string
- func (m *RouteRes) Unmarshal(dAtA []byte) error
- func (m *RouteRes) XXX_DiscardUnknown()
- func (m *RouteRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RouteRes) XXX_Merge(src proto.Message)
- func (m *RouteRes) XXX_Size() int
- func (m *RouteRes) XXX_Unmarshal(b []byte) error
- type UnimplementedListenServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterListenServer ¶
func RegisterListenServer(s *grpc.Server, srv ListenServer)
Types ¶
type Header ¶
type Header struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Val string `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"` }
func (*Header) Descriptor ¶
func (*Header) MarshalToSizedBuffer ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) XXX_DiscardUnknown ¶
func (m *Header) XXX_DiscardUnknown()
func (*Header) XXX_Marshal ¶
func (*Header) XXX_Unmarshal ¶
type ListenClient ¶
type ListenClient interface {
Routing(ctx context.Context, in *RouteReq, opts ...grpc.CallOption) (*RouteRes, error)
}
ListenClient is the client API for Listen service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewListenClient ¶
func NewListenClient(cc *grpc.ClientConn) ListenClient
type ListenServer ¶
ListenServer is the server API for Listen service.
type RouteReq ¶
type RouteReq struct { // nod 目标服务节点名 Nod string `protobuf:"bytes,1,opt,name=nod,proto3" json:"nod,omitempty"` // service 功能函数名 Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` // body ReqBody []byte `protobuf:"bytes,4,opt,name=reqBody,proto3" json:"reqBody,omitempty"` // meta 元数据用于用户定制开发 Meta []*Header `protobuf:"bytes,5,rep,name=meta,proto3" json:"meta,omitempty"` }
func (*RouteReq) Descriptor ¶
func (*RouteReq) GetReqBody ¶
func (*RouteReq) GetService ¶
func (*RouteReq) MarshalToSizedBuffer ¶
func (*RouteReq) ProtoMessage ¶
func (*RouteReq) ProtoMessage()
func (*RouteReq) XXX_DiscardUnknown ¶
func (m *RouteReq) XXX_DiscardUnknown()
func (*RouteReq) XXX_Marshal ¶
func (*RouteReq) XXX_Unmarshal ¶
type RouteRes ¶
type RouteRes struct {
ResBody []byte `protobuf:"bytes,1,opt,name=resBody,proto3" json:"resBody,omitempty"`
}
func (*RouteRes) Descriptor ¶
func (*RouteRes) GetResBody ¶
func (*RouteRes) MarshalToSizedBuffer ¶
func (*RouteRes) ProtoMessage ¶
func (*RouteRes) ProtoMessage()
func (*RouteRes) XXX_DiscardUnknown ¶
func (m *RouteRes) XXX_DiscardUnknown()
func (*RouteRes) XXX_Marshal ¶
func (*RouteRes) XXX_Unmarshal ¶
type UnimplementedListenServer ¶
type UnimplementedListenServer struct { }
UnimplementedListenServer can be embedded to have forward compatible implementations.
Click to show internal directories.
Click to hide internal directories.