node

package
v0.105.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 5 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinimalNodeCfg

type MinimalNodeCfg struct {
	Name                string `json:"name" toml:"name" yaml:"name"`
	CSAKey              string `json:"csa_key" toml:"csa_key" yaml:"csa_key"`
	NOP                 string `json:"nop" toml:"nop" yaml:"nop"`
	EncryptionPublicKey string `json:"encryption_public_key" toml:"encryption_public_key" yaml:"encryption_public_key"`
}

MinimalNodeCfg is the minimal configuration that can be used to identify a node. It represents information that cannot be programmatically derived from Job Distributor.

type NodeCfg

type NodeCfg struct {
	MinimalNodeCfg
	P2PID string `json:"p2p_id" toml:"p2p_id" yaml:"p2p_id"`

	AdminAddr    string            `json:"admin_addr" toml:"admin_addr" yaml:"admin_addr"`
	MultiAddress *string           `json:"multi_address,omitempty" toml:"multi_address,omitempty" yaml:"multi_address,omitempty"` // needed only for bootstrap nodes, bootstrap IP:P2P PORT
	Tags         map[string]string `json:"tags,omitempty" toml:"tags,omitempty" yaml:"tags,omitempty"`
}

NodeCfg is the configuration for a node. It is used to register a node with the job distributor and contains only public information, no secrets or api keys.

func (NodeCfg) IsBootstrap

func (n NodeCfg) IsBootstrap() bool

func (NodeCfg) Labels

func (n NodeCfg) Labels() map[string]string

Labels returns the labels for the node, containing the p2p_id, nop, admin_addr and all tags.

func (NodeCfg) Validate

func (n NodeCfg) Validate() error

Jump to

Keyboard shortcuts

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