Documentation
¶
Index ¶
- Variables
- type Caller
- type Message
- type Option
- type Options
- type Payload
- func (*Payload) Descriptor() ([]byte, []int)
- func (m *Payload) Get(key string) string
- func (m *Payload) GetBody() []byte
- func (m *Payload) GetHeader() map[string]string
- func (*Payload) ProtoMessage()
- func (m *Payload) Reset()
- func (m *Payload) Set(key, value string)
- func (m *Payload) String() string
- func (m *Payload) XXX_DiscardUnknown()
- func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Payload) XXX_Merge(src proto.Message)
- func (m *Payload) XXX_Size() int
- func (m *Payload) XXX_Unmarshal(b []byte) error
- type RemoteMessage
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetEndpoint() string
- func (m *Request) GetId() string
- func (m *Request) GetPayload() *Payload
- func (m *Request) GetService() *service.Service
- 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 (m *Response) GetHeader() map[string]string
- 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 ¶
View Source
var ( DefaultCodecs = map[string]codec.NewCodec{ service.MIMEApplicationJSON: json.NewCodec, } )
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message interface { Service() *service.Service Codec() codec.Codec Topic() string SetTopic(string) SetBody(v interface{}) error GetPayload() *Payload ToObject(v interface{}) error ToRemoteMessage() *RemoteMessage }
Message is the interface for publishing asynchronously
func NewMessage ¶
type Payload ¶
type Payload struct { Header map[string]string `` /* 153-byte string literal not displayed */ 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 (*Payload) Descriptor ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
func (*Payload) XXX_DiscardUnknown ¶
func (m *Payload) XXX_DiscardUnknown()
func (*Payload) XXX_Marshal ¶
func (*Payload) XXX_Unmarshal ¶
type RemoteMessage ¶
type RemoteMessage struct { *service.Service `yaml:"service" json:"service"` *Payload `yaml:"payload" json:"payload"` }
RemoteMessage remote message from two inner servers
func (*RemoteMessage) ToMessage ¶
func (p *RemoteMessage) ToMessage() Message
type Request ¶
type Request struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Service *service.Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"` Payload *Payload `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetEndpoint ¶
func (*Request) GetPayload ¶
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"` Header map[string]string `` /* 153-byte string literal not displayed */ 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.