presenters

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package presenters allow for the specification and result of a Job, its associated TaskSpecs, and every JobRun and TaskRun to be returned in a user friendly human readable format.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FriendlyBigInt

func FriendlyBigInt(n *big.Int) string

FriendlyBigInt returns a string printing the integer in both decimal and hexadecimal formats.

Types

type ConfigPrinter added in v0.8.17

type ConfigPrinter struct {
	EnvPrinter
}

ConfigPrinter are the non-secret values of the node

If you add an entry here, you should update NewConfigPrinter and ConfigPrinter#String accordingly.

func NewConfigPrinter added in v0.8.17

func NewConfigPrinter(config config.GeneralConfig) (ConfigPrinter, error)

NewConfigPrinter creates an instance of ConfigPrinter

func (ConfigPrinter) GetID added in v0.8.17

func (c ConfigPrinter) GetID() string

GetID generates a new ID for jsonapi serialization.

func (*ConfigPrinter) SetID added in v0.8.17

func (c *ConfigPrinter) SetID(value string) error

SetID is used to conform to the UnmarshallIdentifier interface for deserializing from jsonapi documents.

func (ConfigPrinter) String added in v0.8.17

func (c ConfigPrinter) String() string

String returns the values as a newline delimited string

type EnvPrinter added in v0.8.17

type EnvPrinter struct {
	AllowOrigins                               string          `json:"ALLOW_ORIGINS"`
	BlockBackfillDepth                         uint64          `json:"BLOCK_BACKFILL_DEPTH"`
	BlockHistoryEstimatorBlockDelay            uint16          `json:"GAS_UPDATER_BLOCK_DELAY"`
	BlockHistoryEstimatorBlockHistorySize      uint16          `json:"GAS_UPDATER_BLOCK_HISTORY_SIZE"`
	BlockHistoryEstimatorTransactionPercentile uint16          `json:"GAS_UPDATER_TRANSACTION_PERCENTILE"`
	BridgeResponseURL                          string          `json:"BRIDGE_RESPONSE_URL,omitempty"`
	ChainID                                    *big.Int        `json:"ETH_CHAIN_ID"`
	ClientNodeURL                              string          `json:"CLIENT_NODE_URL"`
	DatabaseBackupFrequency                    time.Duration   `json:"DATABASE_BACKUP_FREQUENCY"`
	DatabaseBackupMode                         string          `json:"DATABASE_BACKUP_MODE"`
	DatabaseMaximumTxDuration                  time.Duration   `json:"DATABASE_MAXIMUM_TX_DURATION"`
	DatabaseTimeout                            models.Duration `json:"DATABASE_TIMEOUT"`
	DefaultHTTPLimit                           int64           `json:"DEFAULT_HTTP_LIMIT"`
	DefaultHTTPTimeout                         models.Duration `json:"DEFAULT_HTTP_TIMEOUT"`
	Dev                                        bool            `json:"CHAINLINK_DEV"`
	EthereumDisabled                           bool            `json:"ETH_DISABLED"`
	EthereumHTTPURL                            string          `json:"ETH_HTTP_URL"`
	EthereumSecondaryURLs                      []string        `json:"ETH_SECONDARY_URLS"`
	EthereumURL                                string          `json:"ETH_URL"`
	ExplorerURL                                string          `json:"EXPLORER_URL"`
	FMDefaultTransactionQueueDepth             uint32          `json:"FM_DEFAULT_TRANSACTION_QUEUE_DEPTH"`
	FeatureExternalInitiators                  bool            `json:"FEATURE_EXTERNAL_INITIATORS"`
	FeatureOffchainReporting                   bool            `json:"FEATURE_OFFCHAIN_REPORTING"`
	GasEstimatorMode                           string          `json:"GAS_ESTIMATOR_MODE"`
	InsecureFastScrypt                         bool            `json:"INSECURE_FAST_SCRYPT"`
	JSONConsole                                bool            `json:"JSON_CONSOLE"`
	JobPipelineReaperInterval                  time.Duration   `json:"JOB_PIPELINE_REAPER_INTERVAL"`
	JobPipelineReaperThreshold                 time.Duration   `json:"JOB_PIPELINE_REAPER_THRESHOLD"`
	KeeperDefaultTransactionQueueDepth         uint32          `json:"KEEPER_DEFAULT_TRANSACTION_QUEUE_DEPTH"`
	KeeperMaximumGracePeriod                   int64           `json:"KEEPER_MAXIMUM_GRACE_PERIOD"`
	KeeperMinimumRequiredConfirmations         uint64          `json:"KEEPER_MINIMUM_REQUIRED_CONFIRMATIONS"`
	KeeperRegistryCheckGasOverhead             uint64          `json:"KEEPER_REGISTRY_CHECK_GAS_OVERHEAD"`
	KeeperRegistryPerformGasOverhead           uint64          `json:"KEEPER_REGISTRY_PERFORM_GAS_OVERHEAD"`
	KeeperRegistrySyncInterval                 time.Duration   `json:"KEEPER_REGISTRY_SYNC_INTERVAL"`
	LinkContractAddress                        string          `json:"LINK_CONTRACT_ADDRESS"`
	FlagsContractAddress                       string          `json:"FLAGS_CONTRACT_ADDRESS"`
	Layer2Type                                 string          `json:"LAYER_2_TYPE"`
	LogLevel                                   config.LogLevel `json:"LOG_LEVEL"`
	LogSQLMigrations                           bool            `json:"LOG_SQL_MIGRATIONS"`
	LogSQLStatements                           bool            `json:"LOG_SQL"`
	LogToDisk                                  bool            `json:"LOG_TO_DISK"`
	OCRBootstrapCheckInterval                  time.Duration   `json:"OCR_BOOTSTRAP_CHECK_INTERVAL"`
	TriggerFallbackDBPollInterval              time.Duration   `json:"JOB_PIPELINE_DB_POLL_INTERVAL"`
	OCRContractTransmitterTransmitTimeout      time.Duration   `json:"OCR_CONTRACT_TRANSMITTER_TRANSMIT_TIMEOUT"`
	OCRDatabaseTimeout                         time.Duration   `json:"OCR_DATABASE_TIMEOUT"`
	OCRDefaultTransactionQueueDepth            uint32          `json:"OCR_DEFAULT_TRANSACTION_QUEUE_DEPTH"`
	OCRIncomingMessageBufferSize               int             `json:"OCR_INCOMING_MESSAGE_BUFFER_SIZE"`
	P2PBootstrapPeers                          []string        `json:"P2P_BOOTSTRAP_PEERS"`
	P2PListenIP                                string          `json:"P2P_LISTEN_IP"`
	P2PListenPort                              string          `json:"P2P_LISTEN_PORT"`
	P2PNetworkingStack                         string          `json:"P2P_NETWORKING_STACK"`
	P2PPeerID                                  string          `json:"P2P_PEER_ID"`
	P2PV2AnnounceAddresses                     []string        `json:"P2PV2_ANNOUNCE_ADDRESSES"`
	P2PV2Bootstrappers                         []string        `json:"P2PV2_BOOTSTRAPPERS"`
	P2PV2DeltaDial                             models.Duration `json:"P2PV2_DELTA_DIAL"`
	P2PV2DeltaReconcile                        models.Duration `json:"P2PV2_DELTA_RECONCILE"`
	P2PV2ListenAddresses                       []string        `json:"P2PV2_LISTEN_ADDRESSES"`
	OCROutgoingMessageBufferSize               int             `json:"OCR_OUTGOING_MESSAGE_BUFFER_SIZE"`
	OCRNewStreamTimeout                        time.Duration   `json:"OCR_NEW_STREAM_TIMEOUT"`
	OCRDHTLookupInterval                       int             `json:"OCR_DHT_LOOKUP_INTERVAL"`
	OCRTraceLogging                            bool            `json:"OCR_TRACE_LOGGING"`
	Port                                       uint16          `json:"CHAINLINK_PORT"`
	ReaperExpiration                           models.Duration `json:"REAPER_EXPIRATION"`
	ReplayFromBlock                            int64           `json:"REPLAY_FROM_BLOCK"`
	RootDir                                    string          `json:"ROOT"`
	SecureCookies                              bool            `json:"SECURE_COOKIES"`
	SessionTimeout                             models.Duration `json:"SESSION_TIMEOUT"`
	TelemetryIngressLogging                    bool            `json:"TELEMETRY_INGRESS_LOGGING"`
	TelemetryIngressServerPubKey               string          `json:"TELEMETRY_INGRESS_SERVER_PUB_KEY"`
	TelemetryIngressURL                        string          `json:"TELEMETRY_INGRESS_URL"`
	TLSHost                                    string          `json:"CHAINLINK_TLS_HOST"`
	TLSPort                                    uint16          `json:"CHAINLINK_TLS_PORT"`
	TLSRedirect                                bool            `json:"CHAINLINK_TLS_REDIRECT"`
}

EnvPrinter contains the supported environment variables

type ExternalInitiatorAuthentication added in v0.6.6

type ExternalInitiatorAuthentication struct {
	Name           string        `json:"name,omitempty"`
	URL            models.WebURL `json:"url,omitempty"`
	AccessKey      string        `json:"incomingAccessKey,omitempty"`
	Secret         string        `json:"incomingSecret,omitempty"`
	OutgoingToken  string        `json:"outgoingToken,omitempty"`
	OutgoingSecret string        `json:"outgoingSecret,omitempty"`
}

ExternalInitiatorAuthentication includes initiator and authentication details.

func NewExternalInitiatorAuthentication added in v0.6.6

func NewExternalInitiatorAuthentication(
	ei models.ExternalInitiator,
	eia auth.Token,
) *ExternalInitiatorAuthentication

NewExternalInitiatorAuthentication creates an instance of ExternalInitiatorAuthentication.

func (*ExternalInitiatorAuthentication) GetID added in v0.6.6

GetID returns the jsonapi ID.

func (*ExternalInitiatorAuthentication) GetName added in v0.6.6

GetName returns the collection name for jsonapi.

func (*ExternalInitiatorAuthentication) SetID added in v0.6.6

SetID is used to conform to the UnmarshallIdentifier interface for deserializing from jsonapi documents.

Jump to

Keyboard shortcuts

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