Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalHandler ¶
type ExternalHandler interface {
Connected(nodeID ids.NodeID, nodeVersion interface{}, subnetID ids.ID)
Disconnected(nodeID ids.NodeID)
HandleInbound(context.Context, Message) error
}
ExternalHandler handles messages from external chains
type HealthConfig ¶
type HealthConfig struct {
Enabled bool
Interval time.Duration
Timeout time.Duration
MaxOutstandingChecks int
}
HealthConfig configures health checks
type InboundHandler ¶
InboundHandler handles inbound messages
type Message ¶
type Message interface {
NodeID() ids.NodeID
Op() Op
Get(Field) interface{}
Bytes() []byte
BytesSavedCompression() int
AddRef()
DecRef()
IsProposal() bool
}
Message represents a network message
type Op ¶
type Op byte
Op represents a message operation type
const ( // GetAcceptedFrontier gets accepted frontier GetAcceptedFrontier Op = iota // AcceptedFrontier is accepted frontier response AcceptedFrontier // GetAccepted gets accepted GetAccepted // Accepted is accepted response Accepted // Get gets an item Get // Put puts an item Put // PushQuery pushes a query PushQuery // PullQuery pulls a query PullQuery // Chits is chits response Chits )
Click to show internal directories.
Click to hide internal directories.