flags

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Flag names
	FlagUnixSocketAddress           = "unix-socket-address"
	FlagPanicOnDaemonFailureEnabled = "panic-on-daemon-failure-enabled"
	FlagMaxDaemonUnhealthySeconds   = "max-daemon-unhealthy-seconds"

	FlagPriceDaemonEnabled     = "price-daemon-enabled"
	FlagPriceDaemonLoopDelayMs = "price-daemon-loop-delay-ms"

	FlagBridgeDaemonEnabled        = "bridge-daemon-enabled"
	FlagBridgeDaemonLoopDelayMs    = "bridge-daemon-loop-delay-ms"
	FlagBridgeDaemonEthRpcEndpoint = "bridge-daemon-eth-rpc-endpoint"

	FlagLiquidationDaemonEnabled           = "liquidation-daemon-enabled"
	FlagLiquidationDaemonLoopDelayMs       = "liquidation-daemon-loop-delay-ms"
	FlagLiquidationDaemonQueryPageLimit    = "liquidation-daemon-query-page-limit"
	FlagLiquidationDaemonResponsePageLimit = "liquidation-daemon-response-page-limit"

	// Oracle flags
	FlagOracleEnabled                 = "oracle.enabled"
	FlagOracleAddress                 = "oracle.oracle_address"
	FlagOracleClientTimeout           = "oracle.client_timeout"
	FlagOracleMetricsEnabled          = "oracle.metrics_enabled"
	FlagOraclePrometheusServerAddress = "oracle.prometheus_server_address"
)

List of CLI flags for Server and Client.

Variables

This section is empty.

Functions

func AddDaemonFlagsToCmd

func AddDaemonFlagsToCmd(
	cmd *cobra.Command,
)

AddDaemonFlagsToCmd adds the required flags to instantiate a server and client for price updates. These flags should be applied to the `start` command V4 Cosmos application. E.g. `dydxprotocold start --price-daemon-enabled=true --unix-socket-address $(unix_socket_address)`

Types

type BridgeFlags

type BridgeFlags struct {
	// Enabled toggles the bridge daemon on or off.
	Enabled bool
	// LoopDelayMs configures the update frequency of the bridge daemon.
	LoopDelayMs uint32
	// EthRpcEndpoint is the endpoint for the Ethereum node where bridge data is queried.
	EthRpcEndpoint string
}

BridgeFlags contains configuration flags for the Bridge Daemon.

type DaemonFlags

type DaemonFlags struct {
	Shared      SharedFlags
	Bridge      BridgeFlags
	Liquidation LiquidationFlags
	Price       PriceFlags
	Slinky      SlinkyFlags
}

DaemonFlags contains the collected configuration flags for all daemons.

func GetDaemonFlagValuesFromOptions

func GetDaemonFlagValuesFromOptions(
	appOpts servertypes.AppOptions,
) DaemonFlags

GetDaemonFlagValuesFromOptions gets all daemon flag values from the `AppOptions` struct.

func GetDefaultDaemonFlags

func GetDefaultDaemonFlags() DaemonFlags

GetDefaultDaemonFlags returns the default values for the Daemon Flags using a singleton pattern.

type LiquidationFlags

type LiquidationFlags struct {
	// Enabled toggles the liquidation daemon on or off.
	Enabled bool
	// LoopDelayMs configures the update frequency of the liquidation daemon.
	LoopDelayMs uint32
	// QueryPageLimit configures the pagination limit for fetching subaccounts.
	QueryPageLimit uint64
	// ResponsePageLimit configures the pagination limit for the response to application.
	ResponsePageLimit uint64
}

LiquidationFlags contains configuration flags for the Liquidation Daemon.

type PriceFlags

type PriceFlags struct {
	// Enabled toggles the price daemon on or off.
	Enabled bool
	// LoopDelayMs configures the update frequency of the price daemon.
	LoopDelayMs uint32
}

PriceFlags contains configuration flags for the Price Daemon.

type SharedFlags

type SharedFlags struct {
	// SocketAddress is the location of the unix socket to communicate with the daemon gRPC service.
	SocketAddress string
	// PanicOnDaemonFailureEnabled toggles whether the daemon should panic on failure.
	PanicOnDaemonFailureEnabled bool
	// MaxDaemonUnhealthySeconds is the maximum allowable duration for which a daemon can be unhealthy.
	MaxDaemonUnhealthySeconds uint32
}

Shared flags contains configuration flags shared by all daemons.

type SlinkyFlags

type SlinkyFlags struct {
	oracleconfig.AppConfig
}

Jump to

Keyboard shortcuts

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