Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶ added in v0.9.18
type Context interface { // Return the Go context Context() context.Context // Get the headers of the message Headers() *messages.CommonHeaders // Unmarshal the supplied message into a give type Unmarshal(msg interface{}) error // Send an error reply SendErrorReply(status int, err error) // Send an error reply SendErrorReplyWithTX(status int, err error, txHash string) // Send a reply that can be marshaled into bytes. // Sets all the common headers on behalf of the caller, based on the request context Reply(replyMsg messages.ReplyWithHeaders) // Get a string summary String() string }
Context is passed for each message that arrives at the bridge
type Processor ¶ added in v0.9.18
type Processor interface { OnMessage(Context) Init(client.RPCClient) GetRPCClient() client.RPCClient }
Processor interface is called for each message, as is responsible for tracking all in-flight messages
func NewTxProcessor ¶
func NewTxProcessor(conf *conf.RESTGatewayConf) Processor
NewTxnProcessor constructor for message procss
Click to show internal directories.
Click to hide internal directories.