clnode

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

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 {
	DataProviderURL string          `toml:"data_provider_url" validate:"required"`
	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"`
	Tag                  string `toml:"tag" validate:"required"`
	Port                 string `toml:"port" validate:"required"`
	TestConfigOverrides  string `toml:"test_config_overrides"`
	UserConfigOverrides  string `toml:"user_config_overrides"`
	TestSecretsOverrides string `toml:"test_secrets_overrides"`
	UserSecretsOverrides string `toml:"user_secrets_overrides"`
}

NodeInput is CL nod container inputs

type NodeOut

type NodeOut struct {
	HostURL   string `toml:"url"`
	DockerURL string `toml:"docker_internal_url"`
}

NodeOut is CL node container output, URLs to connect

type Output

type Output struct {
	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) (*Output, error)

NewNode 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