common

package
v1.22.15 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUndefined = errors.New("undefined error")
)

Common errors

Functions

This section is empty.

Types

type AppError

type AppError = warp.AppError

AppError represents an application-level error.

type AppSender added in v1.19.13

type AppSender = warp.AppSender

AppSender sends application-level messages between nodes.

type Error added in v1.22.13

type Error = warp.Error

Error is an alias for warp.Error

type Fx added in v1.19.13

type Fx struct {
	ID ids.ID
	Fx interface{}
}

Fx represents a feature extension

type Handler added in v1.22.9

type Handler = warp.Handler

Handler handles warp messages.

type Message

type Message struct {
	Type    MessageType
	NodeID  ids.NodeID
	Content []byte
}

Message represents a network message

type MessageType

type MessageType uint32

MessageType defines the type of a message

const (
	// PendingTxs indicates pending transactions
	PendingTxs MessageType = iota
	// PutBlock indicates a block to be added
	PutBlock
	// GetBlock indicates a request for a block
	GetBlock
	// GetAccepted indicates a request for accepted blocks
	GetAccepted
	// Accepted indicates an accepted block
	Accepted
	// GetAncestors indicates a request for ancestors
	GetAncestors
	// MultiPut indicates multiple blocks
	MultiPut
	// GetFailed indicates a failed get request
	GetFailed
	// QueryFailed indicates a failed query
	QueryFailed
	// Chits indicates chits message
	Chits
	// ChitsV2 indicates chits v2 message
	ChitsV2
	// GetAcceptedFrontier indicates a request for accepted frontier
	GetAcceptedFrontier
	// AcceptedFrontier indicates accepted frontier
	AcceptedFrontier
	// GetAcceptedFrontierFailed indicates a failed frontier request
	GetAcceptedFrontierFailed
	// WarpRequest indicates a warp request
	WarpRequest
	// WarpResponse indicates a warp response
	WarpResponse
	// WarpGossip indicates warp gossip
	WarpGossip
)

func (MessageType) String

func (m MessageType) String() string

String returns the string representation of the message type

type SendConfig added in v1.22.14

type SendConfig = warp.SendConfig

SendConfig configures message sending.

type Sender added in v1.22.9

type Sender = warp.Sender

Sender sends warp messages.

Jump to

Keyboard shortcuts

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