Help us shape the future of Go! Take the 2026 Go Developer Survey

getter

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Getter

type Getter interface {
	// Get retrieves vertices by their IDs
	Get(
		ctx context.Context,
		nodeID ids.NodeID,
		requestID uint32,
		vtxIDs set.Set[ids.ID],
	) error

	// GetAncestors retrieves ancestors of a vertex
	GetAncestors(
		ctx context.Context,
		nodeID ids.NodeID,
		requestID uint32,
		vtxID ids.ID,
	) error
}

Getter defines the interface for fetching vertices

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages vertex fetching operations

func NewManager

func NewManager(getter Getter, timeout time.Duration) *Manager

NewManager creates a new getter manager

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, nodeID ids.NodeID, vtxIDs set.Set[ids.ID]) error

Get initiates a vertex fetch request

func (*Manager) GetAncestors

func (m *Manager) GetAncestors(ctx context.Context, nodeID ids.NodeID, vtxID ids.ID) error

GetAncestors initiates an ancestor fetch request

func (*Manager) OnResponse

func (m *Manager) OnResponse(reqID uint32)

OnResponse handles responses to fetch requests

func (*Manager) TimeoutPending

func (m *Manager) TimeoutPending()

TimeoutPending removes timed out requests

Jump to

Keyboard shortcuts

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