tx

package
v0.9.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL