{"modulePath":"github.com/smartcontractkit/chainlink-testing-framework/framework","version":"v0.17.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package clnode\n\n## Constants\n\n```go\nconst (\n\tDefaultHTTPPort        = \"6688\"\n\tDefaultP2PPort         = \"6690\"\n\tDefaultDebuggerPort    = 40000\n\tTmpImageName           = \"chainlink-tmp:latest\"\n\tCustomPortSeparator    = \":\"\n\tDefaultCapabilitiesDir = \"/usr/local/bin\"\n\tConfigVolumeName       = \"clnode-config\"\n\tHomeVolumeName         = \"clnode-home\"\n)\n```\n\n```go\nconst (\n\tDefaultTestKeystorePassword = \"thispasswordislongenough\"\n\tDefaultPasswordTxt          = `T.tLHkcmwePT/p,]sYuntjwHKAsrhm#4eRs4LuKHwvHejWYAC2JP4M8HimwgmbaZ` //nolint:gosec\n\tDefaultAPICredentials       = `notreal@fakeemail.ch\nfj293fbBnlQ!f9vNs`\n\tDefaultAPIUser     = `notreal@fakeemail.ch`\n\tDefaultAPIPassword = `fj293fbBnlQ!f9vNs` //nolint:gosec\n)\n```\n\n## Functions\n\n```go\nfunc NewNetworkCfg(in *EVMNetworkConfig, out *blockchain.Output) (string, error)\n```\nNewNetworkCfg generate new network configuration from blockchain.Output EVMNodes is used to set priority and primary/secondary for particular nodes\n\n```go\nfunc NewNetworkCfgOneNetworkAllNodes(out *blockchain.Output) (string, error)\n```\nNewNetworkCfgOneNetworkAllNodes is simplified CL node network configuration where we add all the nodes are from the same network\n\n```go\nfunc WriteTmpFile(data, filePath string) (*os.File, error)\n```\nWriteTmpFile writes the provided data string to a specified filepath and returns the file and any error encountered.\n\n## Types\n\n```go\ntype DefaultCLNodeConfig struct {\n\tHTTPPort      string\n\tSecureCookies bool\n}\n```\n\n```go\ntype DefaultSecretsConfig struct {\n\tDatabaseURL string\n\tKeystore    string\n}\n```\n\n```go\ntype EVMNetworkConfig struct {\n\tMinIncomingConfirmations int\n\tMinContractPayment       string\n\tChainID                  string\n\tEVMNodes                 []*EVMNode\n}\n```\nEVMNetworkConfig is CL node network configuration\n\n```go\ntype EVMNode struct {\n\tName     string\n\tWsUrl    string\n\tHttpUrl  string\n\tSendOnly bool\n\tOrder    int\n}\n```\nEVMNode is CL node EVM node\n\n```go\ntype Input struct {\n\t// NoDNS whether to allow DNS in Docker containers or not, useful for isolating containers from network if set to 'false'\n\tNoDNS bool `toml:\"no_dns\" comment:\"whether to allow DNS in Docker containers or not, useful for isolating containers from network if set to 'false'\"`\n\t// DbInput PostgreSQL database configuration\n\tDbInput *postgres.Input `toml:\"db\" validate:\"required\" comment:\"PostgreSQL database configuration\"`\n\t// Node Chainlink node configuration\n\tNode *NodeInput `toml:\"node\" validate:\"required\" comment:\"Chainlink node configuration\"`\n\t// Out Chainlink node configuration output\n\tOut *Output `toml:\"out\" comment:\"Chainlink node configuration output\"`\n}\n```\nInput represents Chainlink node input\n\n```go\ntype NodeInput struct {\n\t// Image Chainlink node Docker image in format $registry:$tag\n\tImage string `toml:\"image\" validate:\"required\" comment:\"Chainlink node Docker image in format $registry:$tag\"`\n\t// Name Chainlink node Docker container name\n\tName string `toml:\"name\" comment:\"Chainlink node Docker container name\"`\n\t// DockerFilePath Docker file path to rebuild, relative to 'docker_ctx' field path\n\tDockerFilePath string `toml:\"docker_file\" comment:\"Docker file path to rebuild, relative to 'docker_ctx' field path\"`\n\t// DockerContext Docker build context path\n\tDockerContext string `toml:\"docker_ctx\" comment:\"Docker build context path\"`\n\t// DockerBuildArgs Docker build args\n\tDockerBuildArgs map[string]string `toml:\"docker_build_args\" comment:\"Docker build args in format key = value or map format, ex.: \\\"CL_IS_PROD_BUILD\\\" = \\\"false\\\" \"`\n\t// PullImage whether to pull Docker image or not\n\tPullImage bool `toml:\"pull_image\" comment:\"Whether to pull Docker image or not\"`\n\t// CapabilitiesBinaryPaths Chainlink CRE capabilities paths for WASM binaries\n\tCapabilitiesBinaryPaths []string `toml:\"capabilities\" comment:\"Chainlink CRE capabilities paths for WASM binaries\"`\n\t// CapabilityContainerDir path to capabilities inside Docker container (capabilities are copied inside container from local path)\n\tCapabilityContainerDir string `toml:\"capabilities_container_dir\" comment:\"path to capabilities inside Docker container (capabilities are copied inside container from local path)\"`\n\t// TestConfigOverrides node config overrides field for programmatic usage in tests\n\tTestConfigOverrides string `toml:\"test_config_overrides\" comment:\"node config overrides field for programmatic usage in tests\"`\n\t// UserConfigOverrides node config overrides field for manual overrides from env.toml configs\n\tUserConfigOverrides string `toml:\"user_config_overrides\" comment:\"node config overrides field for manual overrides from env.toml configs\"`\n\t// TestSecretsOverrides node secrets config overrides field for programmatic usage in tests\n\tTestSecretsOverrides string `toml:\"test_secrets_overrides\" comment:\"node secrets config overrides field for programmatic usage in tests\"`\n\t// UserSecretsOverrides node secrets config overrides field for manual overrides from env.toml configs\n\tUserSecretsOverrides string `toml:\"user_secrets_overrides\" comment:\"node secrets config overrides field for manual overrides from env.toml configs\"`\n\t// HTTPPort Chainlink node API HTTP port\n\tHTTPPort int `toml:\"port\" comment:\"Chainlink node API HTTP port\"`\n\t// P2PPort Chainlink node P2P port\n\tP2PPort int `toml:\"p2p_port\" comment:\"Chainlink node P2P port\"`\n\t// CustomPorts Custom ports pairs in format $host_port_number:$docker_port_number\n\tCustomPorts []string `toml:\"custom_ports\" comment:\"Custom ports pairs in format $host_port_number:$docker_port_number\"`\n\t// DebuggerPort Delve debugger port\n\tDebuggerPort int `toml:\"debugger_port\" comment:\"Delve debugger port\"`\n\t// ContainerResources Docker container resources\n\tContainerResources *framework.ContainerResources `toml:\"resources\" comment:\"Docker container resources\"`\n\t// EnvVars Docker container environment variables\n\tEnvVars map[string]string `toml:\"env_vars\" comment:\"Docker container environment variables\"`\n}\n```\nNodeInput is CL nod container inputs\n\n```go\ntype NodeOut struct {\n\t// APIAuthUser user name for basic login/password authorization in Chainlink node\n\tAPIAuthUser string `toml:\"api_auth_user\" comment:\"User name for basic login/password authorization in Chainlink node\"`\n\t// APIAuthPassword password for basic login/password authorization in Chainlink node\n\tAPIAuthPassword string `toml:\"api_auth_password\" comment:\"Password for basic login/password authorization in Chainlink node\"`\n\t// ContainerName node Docker contaienr name\n\tContainerName string `toml:\"container_name\" comment:\"Node Docker contaner name\"`\n\t// ExternalURL node external API HTTP URL\n\tExternalURL string `toml:\"url\" comment:\"Node external API HTTP URL\"`\n\t// InternalURL node internal API HTTP URL\n\tInternalURL string `toml:\"internal_url\" comment:\"Node internal API HTTP URL\"`\n\t// InternalP2PUrl node internal P2P URL\n\tInternalP2PUrl string `toml:\"p2p_internal_url\" comment:\"Node internal P2P URL\"`\n\t// InternalIP node internal IP\n\tInternalIP string `toml:\"internal_ip\" comment:\"Node internal IP\"`\n\t// K8sService is a Kubernetes service spec used to connect locally\n\tK8sService *v1.Service `toml:\"k8s_service\" comment:\"Kubernetes service spec used to connect locally\"`\n}\n```\nNodeOut is CL node container output, URLs to connect\n\n```go\ntype Output struct {\n\t// UseCache Whether to respect caching or not, if cache = true component won't be deployed again\n\tUseCache bool `toml:\"use_cache\" comment:\"Whether to respect caching or not, if cache = true component won't be deployed again\"`\n\t// Node Chainlink node config output\n\tNode *NodeOut `toml:\"node\" comment:\"Chainlink node config output\"`\n\t// PostgreSQL PostgreSQL config output\n\tPostgreSQL *postgres.Output `toml:\"postgresql\" comment:\"PostgreSQL config output\"`\n}\n```\nOutput represents Chainlink node output, nodes and databases connection URLs\n\n```go\nfunc NewNode(in *Input, pgOut *postgres.Output) (*Output, error)\n```\n\n```go\nfunc NewNodeWithContext(ctx context.Context, in *Input, pgOut *postgres.Output) (*Output, error)\n```\n\n```go\nfunc NewNodeWithDB(in *Input) (*Output, error)\n```\nNewNodeWithDB create a new Chainlink node with some image:tag and one or several configs see config params: TestConfigOverrides, UserConfigOverrides, etc\n\n```go\nfunc NewNodeWithDBAndContext(ctx context.Context, in *Input) (*Output, error)\n```\nNewNodeWithDBAndContext create a new Chainlink node with some image:tag and one or several configs see config params: TestConfigOverrides, UserConfigOverrides, etc\n\n","path":"github.com/smartcontractkit/chainlink-testing-framework/framework/components/clnode","name":"clnode","synopsis":"","isRedistributable":true}
