Documentation
¶
Index ¶
- type Empty
- type Event
- type EventReceive
- type Message
- func (m *Message) Latency() time.Duration
- func (m *Message) Marshal() []byte
- func (m *Message) ResponseLatency() time.Duration
- func (m *Message) SendLatency() time.Duration
- func (m *Message) SetPayload(n int)
- func (m *Message) SetReceiveResponseTime()
- func (m *Message) SetReceiveTime()
- func (m *Message) SetSendResponseTime()
- func (m *Message) SetSendTime()
- func (m *Message) Validate() error
- type Request
- type RequestTypeData
- type Response
- type Transport
- type TransportType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Id string `json:"id,omitempty"` SendTime int64 `json:"send_time,omitempty"` ReceiveTime int64 `json:"receive_time,omitempty"` SendResponseTime int64 `json:"send_response_time,omitempty"` ReceiveResponseTime int64 `json:"receive_response_time,omitempty"` Payload []byte `json:"payload,omitempty"` CRC [32]byte `json:"crc,omitempty"` }
Message - base message
func (*Message) SetReceiveResponseTime ¶
func (m *Message) SetReceiveResponseTime()
SetReceiveResponseTime
type Transport ¶
type Transport interface { SendEvent(ctx context.Context, channel string, m *Message) error SendEventStore(ctx context.Context, channel string, m *Message) error SendCommand(ctx context.Context, channel string, m *Message, timeout time.Duration) error SendQuery(ctx context.Context, channel string, m *Message, timeout time.Duration) (*Message, error) ReceiveEvent(ctx context.Context, channel string, group string, rxCh chan *Message, errCh chan error) error ReceiveEventStore(ctx context.Context, channel string, group string, rxCh chan *Message, errCh chan error) error ReceiveCommand(ctx context.Context, channel string, group string, rxCh chan *Message, errCh chan error) error ReceiveQuery(ctx context.Context, channel string, group string, rxCh chan *Message, errCh chan error) error Close() error }
type TransportType ¶
type TransportType int
const ( TransportTypeGRPC TransportType = iota TransportTypeREST )
Click to show internal directories.
Click to hide internal directories.