getter

package
v1.22.46 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.22.46

type Config struct {
	VtxManager             state.Manager
	Sender                 sender.Sender
	Log                    log.Logger
	MaxTimeGetAncestors    time.Duration
	AncestorsMaxContainers int
}

Config for creating a Handler

type Getter

type Getter interface {
	// Get gets a vertex
	Get(context.Context, ids.NodeID, uint32, ids.ID) error

	// GetAncestors gets ancestors
	GetAncestors(context.Context, ids.NodeID, uint32, ids.ID, int) error

	// Put puts a vertex
	Put(context.Context, ids.NodeID, uint32, []byte) error

	// PushQuery pushes a query
	PushQuery(context.Context, ids.NodeID, uint32, []byte) error

	// PullQuery pulls a query
	PullQuery(context.Context, ids.NodeID, uint32, ids.ID) error
}

Getter gets vertices

func New

func New() Getter

New creates a new getter

type Handler added in v1.22.46

type Handler interface {
	Getter
}

Handler handles get requests for DAG vertices

func NewHandler added in v1.22.46

func NewHandler(
	vtxManager state.Manager,
	sender sender.Sender,
	log log.Logger,
	maxTimeGetAncestors time.Duration,
	ancestorsMaxContainers int,
) (Handler, error)

NewHandler creates a new handler with config

Jump to

Keyboard shortcuts

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