flags

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Flag names
	FlagUnixSocketAddress = "unix-socket-address"

	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"
	FlagLiquidationDaemonSubaccountPageLimit = "liquidation-daemon-subaccount-page-limit"
	FlagLiquidationDaemonRequestChunkSize    = "liquidation-daemon-request-chunk-size"
)

List of CLI flags for Server and Client.

Variables

This section is empty.

Functions

func AddDaemonFlagsToCmd

func AddDaemonFlagsToCmd(
	cmd *cobra.Command,
)

AddSharedPriceFeedFlagsToCmd 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        bool
	LoopDelayMs    uint32
	EthRpcEndpoint string
}

type DaemonFlags

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

func GetDaemonFlagValuesFromOptions

func GetDaemonFlagValuesFromOptions(
	appOpts servertypes.AppOptions,
) DaemonFlags

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

func GetDefaultDaemonFlags

func GetDefaultDaemonFlags() DaemonFlags

Returns the default values for the Daemon Flags using a singleton pattern.

type LiquidationFlags

type LiquidationFlags struct {
	Enabled             bool
	LoopDelayMs         uint32
	SubaccountPageLimit uint64
	RequestChunkSize    uint64
}

type PriceFlags

type PriceFlags struct {
	Enabled     bool
	LoopDelayMs uint32
}

type SharedFlags

type SharedFlags struct {
	SocketAddress string
}

Jump to

Keyboard shortcuts

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