sender

package
v1.22.45 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GetAcceptedFrontier = router.GetAcceptedFrontier
	AcceptedFrontier    = router.AcceptedFrontier
	GetAccepted         = router.GetAccepted
	Accepted            = router.Accepted
	Get                 = router.Get
	Put                 = router.Put
	PushQuery           = router.PushQuery
	PullQuery           = router.PullQuery
	Chits               = router.Chits
)

Op constants re-exported from core/router

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	NodeIDs   set.Set[ids.NodeID]
	RequestID uint32
	Op        Op
	Bytes     []byte
}

Message represents a message to send

type Op

type Op = router.Op

Op re-exports from core/router for consistency

type Sender

type Sender interface {
	// Send sends a message
	Send(context.Context, Message) error

	// SendRequest sends a warp request
	SendRequest(context.Context, set.Set[ids.NodeID], uint32, []byte) error

	// SendResponse sends a warp response
	SendResponse(context.Context, ids.NodeID, uint32, []byte) error

	// SendGossip sends warp gossip
	SendGossip(context.Context, warp.SendConfig, []byte) error
}

Sender sends messages

Directories

Path Synopsis
Package sendermock provides mock implementations for message sending
Package sendermock provides mock implementations for message sending
Package sendertest provides test utilities for message sending
Package sendertest provides test utilities for message sending

Jump to

Keyboard shortcuts

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