clnode

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultHTTPPort = "6688"
	DefaultP2PPort  = "6690"
)
View Source
const (
	DefaultTestKeystorePassword = "thispasswordislongenough"
	DefaultPasswordTxt          = `T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ`
	DefaultAPICredentials       = `notreal@fakeemail.ch
fj293fbBnlQ!f9vNs`
	DefaultAPIUser     = `notreal@fakeemail.ch`
	DefaultAPIPassword = `fj293fbBnlQ!f9vNs`
)

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"`
	DockerImageName         string   `toml:"docker_image_name"`
	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             []int    `toml:"custom_ports"`
}

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"`
}

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