Documentation ¶
Overview ¶
Package cmd is the front-end interface for the application as a command-line utility.
Authenticator ¶
Authenticator prompts the user for their password, which is used to unlock their keystore file to interact with the Ethereum blockchain. Since multiple keystore files can exist at the configured directory, the Authenticator will try the password on all keystore files present.
Client ¶
Client is how the application is invoked from the command line. When you run the binary, for example `./chainlink n`, client.RunNode is called to start the Chainlink core. Similarly, running `./chainlink j` returns information on all jobs in the node, and `./chainlink s` with another argument as a JobID gives information specific to that job.
Renderer ¶
Renderer helps format and display data (based on the kind of data it is) to the command line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppFactory ¶
type AppFactory interface {
NewApplication(strpkg.Config) services.Application
}
AppFactory implements the NewApplication method.
type Authenticator ¶
Authenticator implements the Authenticate method for the store and a password string.
type ChainlinkAppFactory ¶
type ChainlinkAppFactory struct{}
ChainlinkAppFactory is used to create a new Application.
func (ChainlinkAppFactory) NewApplication ¶
func (n ChainlinkAppFactory) NewApplication(config strpkg.Config) services.Application
NewApplication returns a new instance of the node with the given config.
type ChainlinkRunner ¶
type ChainlinkRunner struct{}
ChainlinkRunner is used to run the node application.
func (ChainlinkRunner) Run ¶
func (n ChainlinkRunner) Run(app services.Application) error
Run sets the log level based on config and starts the web router to listen for input and return data.
type Client ¶
type Client struct { Renderer Config strpkg.Config AppFactory AppFactory Auth Authenticator Runner Runner }
Client is the shell for the node. It has fields for the Renderer, Config, AppFactory (the services application), Authenticator, and Runner.
func (*Client) GetJobSpecs ¶
GetJobSpecs returns all job specs.
type PasswordPrompter ¶
type PasswordPrompter struct{}
PasswordPrompter is used to display and read input from the user.
func (PasswordPrompter) Prompt ¶
func (pp PasswordPrompter) Prompt(prompt string) string
Prompt displays the prompt for the user to enter the password and reads their input.
type Renderer ¶
type Renderer interface {
Render(interface{}) error
}
Renderer implements the Render method.
type RendererJSON ¶
RendererJSON is used to render JSON data.
func (RendererJSON) Render ¶
func (rj RendererJSON) Render(v interface{}) error
Render writes the given input as a JSON string.
type RendererTable ¶
RendererTable is used for data to be rendered as a table.
func (RendererTable) Render ¶
func (rt RendererTable) Render(v interface{}) error
Render returns a formatted table of text for a given Job or presenter and relevant information.
type Runner ¶
type Runner interface {
Run(services.Application) error
}
Runner implements the Run method.
type TerminalAuthenticator ¶
TerminalAuthenticator contains fields for prompting the user and an exit code.
func (TerminalAuthenticator) Authenticate ¶
func (auth TerminalAuthenticator) Authenticate(store *store.Store, pwd string)
Authenticate checks to see if there are accounts present in the KeyStore, and if there are none, a new account will be created by prompting for a password. If there are accounts present, the account which is unlocked by the given password will be used.