node

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 5 Imported by: 0

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