Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Source uint8 // Source where message was initiated Destination uint8 // Destination chain of message Data interface{} // Data associated with the message ID string // ID is used to track and identify message across networks Type MessageType // Message type Timestamp time.Time // }
func NewMessage ¶
type MessageHandler ¶
type MessageHandler struct {
// contains filtered or unexported fields
}
func NewMessageHandler ¶
func NewMessageHandler() *MessageHandler
func (*MessageHandler) HandleMessage ¶
func (h *MessageHandler) HandleMessage(m *Message) (*proposal.Proposal, error)
HandlerMessage calls associated handler for that message type and returns a proposal to be submitted on-chain
func (*MessageHandler) RegisterMessageHandler ¶
func (mh *MessageHandler) RegisterMessageHandler(t MessageType, h Handler)
RegisterMessageHandler registers a message handler by associating a handler to a message type
type MessageStatus ¶
type MessageStatus string
const ( SuccessfulMessage MessageStatus = "successful" FailedMessage MessageStatus = "failed" PendingMessage MessageStatus = "pending" )
type MessageType ¶
type MessageType string
Click to show internal directories.
Click to hide internal directories.