clnode

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 19 Imported by: 4 modules, 6 packages

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

View Source
const (
	DefaultHTTPPort     = "6688"
	DefaultP2PPort      = "6690"
	DefaultDebuggerPort = 40000
	TmpImageName        = "chainlink-tmp:latest"
	CustomPortSeparator = ":"
)
View Source
const (
	DefaultTestKeystorePassword = "thispasswordislongenough"
	DefaultPasswordTxt          = `T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ` //nolint:gosec
	DefaultAPICredentials       = `notreal@fakeemail.ch
fj293fbBnlQ!f9vNs`
	DefaultAPIUser     = `notreal@fakeemail.ch`
	DefaultAPIPassword = `fj293fbBnlQ!f9vNs` //nolint:gosec
)

Variables

This section is empty.

Functions

func NewNetworkCfg

func NewNetworkCfg(in *EVMNetworkConfig, out *blockchain.Output) (string, error)

NewNetworkCfg generate new network configuration from blockchain.Output EVMNodes is used to set priority and primary/secondary for particular nodes

func NewNetworkCfgOneNetworkAllNodes

func NewNetworkCfgOneNetworkAllNodes(out *blockchain.Output) (string, error)

NewNetworkCfgOneNetworkAllNodes is simplified CL node network configuration where we add all the nodes are from the same network

func WriteTmpFile

func WriteTmpFile(data, filePath string) (*os.File, error)

WriteTmpFile writes the provided data string to a specified filepath and returns the file and any error encountered.

Types

type DefaultCLNodeConfig

type DefaultCLNodeConfig struct {
	HTTPPort      string
	SecureCookies bool
}

type DefaultSecretsConfig

type DefaultSecretsConfig struct {
	DatabaseURL string
	Keystore    string
}

type EVMNetworkConfig

type EVMNetworkConfig struct {
	MinIncomingConfirmations int
	MinContractPayment       string
	ChainID                  string
	EVMNodes                 []*EVMNode
}

EVMNetworkConfig is CL node network configuration

type EVMNode

type EVMNode struct {
	Name     string
	WsUrl    string
	HttpUrl  string
	SendOnly bool
	Order    int
}

EVMNode is CL node EVM node

type Input

type Input struct {
	DbInput *postgres.Input `toml:"db" validate:"required"`
	Node    *NodeInput      `toml:"node" validate:"required"`
	Out     *Output         `toml:"out"`
}

Input represents Chainlink node input

type NodeInput

type NodeInput struct {
	Image                   string                        `toml:"image" validate:"required"`
	Name                    string                        `toml:"name"`
	DockerFilePath          string                        `toml:"docker_file"`
	DockerContext           string                        `toml:"docker_ctx"`
	PullImage               bool                          `toml:"pull_image"`
	CapabilitiesBinaryPaths []string                      `toml:"capabilities"`
	CapabilityContainerDir  string                        `toml:"capabilities_container_dir"`
	TestConfigOverrides     string                        `toml:"test_config_overrides"`
	UserConfigOverrides     string                        `toml:"user_config_overrides"`
	TestSecretsOverrides    string                        `toml:"test_secrets_overrides"`
	UserSecretsOverrides    string                        `toml:"user_secrets_overrides"`
	HTTPPort                int                           `toml:"port"`
	P2PPort                 int                           `toml:"p2p_port"`
	CustomPorts             []string                      `toml:"custom_ports"`
	DebuggerPort            int                           `toml:"debugger_port"`
	ContainerResources      *framework.ContainerResources `toml:"resources"`
}

NodeInput is CL nod container inputs

type NodeOut

type NodeOut struct {
	APIAuthUser     string `toml:"api_auth_user"`
	APIAuthPassword string `toml:"api_auth_password"`
	ContainerName   string `toml:"container_name"`
	HostURL         string `toml:"url"`
	DockerURL       string `toml:"docker_internal_url"`
	DockerP2PUrl    string `toml:"p2p_docker_internal_url"`
	InternalIP      string `toml:"internal_ip"`
}

NodeOut is CL node container output, URLs to connect

type Output

type Output struct {
	UseCache   bool             `toml:"use_cache"`
	Node       *NodeOut         `toml:"node"`
	PostgreSQL *postgres.Output `toml:"postgresql"`
}

Output represents Chainlink node output, nodes and databases connection URLs

func NewNode

func NewNode(in *Input, pgOut *postgres.Output) (*Output, error)

func NewNodeWithDB added in v0.1.1

func NewNodeWithDB(in *Input) (*Output, error)

NewNodeWithDB create a new Chainlink node with some image:tag and one or several configs see config params: TestConfigOverrides, UserConfigOverrides, etc

Jump to

Keyboard shortcuts

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