cmd

package
v0.0.0-...-4e9d6c2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthCmd

func AuthCmd(fsets ...*flag.FlagSet) *cobra.Command

func DefaultNodeStorePath

func DefaultNodeStorePath(tp string, network string) (string, error)

DefaultNodeStorePath constructs the default node store path using the given node type and network.

func Init

func Init(fsets ...*flag.FlagSet) *cobra.Command

Init constructs a CLI command to initialize Elysium Node of any type with the given flags.

func MiscFlags

func MiscFlags() *flag.FlagSet

MiscFlags gives a set of hardcoded miscellaneous flags.

func Network

func Network(ctx context.Context) p2p.Network

Network reads the node type from the context.

func NodeConfig

func NodeConfig(ctx context.Context) nodebuilder.Config

NodeConfig reads the node config from the context.

func NodeFlags

func NodeFlags() *flag.FlagSet

NodeFlags gives a set of hardcoded Node package flags.

func NodeInfo

func NodeInfo(ctx context.Context) node.BuildInfo

NodeInfo reads the node build inforamtion from the context.

func NodeOptions

func NodeOptions(ctx context.Context) []fx.Option

NodeOptions returns config options parsed from Environment(Flags, ENV vars, etc)

func NodeType

func NodeType(ctx context.Context) node.Type

NodeType reads the node type from the context.

func ParseMiscFlags

func ParseMiscFlags(ctx context.Context, cmd *cobra.Command) (context.Context, error)

ParseMiscFlags parses miscellaneous flags from the given cmd and applies values to Env.

func ParseNodeFlags

func ParseNodeFlags(ctx context.Context, cmd *cobra.Command, network p2p.Network) (context.Context, error)

ParseNodeFlags parses Node flags from the given cmd and applies values to Env.

func RemoveConfigCmd

func RemoveConfigCmd(fsets ...*flag.FlagSet) *cobra.Command

func ResetStore

func ResetStore(fsets ...*flag.FlagSet) *cobra.Command

ResetStore constructs a CLI command to reset the store of Elysium Node.

func Start

func Start(fsets ...*flag.FlagSet) *cobra.Command

Start constructs a CLI command to start Elysium Node daemon of any type with the given flags.

func StorePath

func StorePath(ctx context.Context) string

StorePath reads the store path from the context.

func UpdateConfigCmd

func UpdateConfigCmd(fsets ...*flag.FlagSet) *cobra.Command

func WithNetwork

func WithNetwork(ctx context.Context, network p2p.Network) context.Context

WithNetwork sets the network in the given context.

func WithNodeBuildInfo

func WithNodeBuildInfo(ctx context.Context, info *node.BuildInfo) context.Context

WithNodeConfig sets the node config build information.

func WithNodeConfig

func WithNodeConfig(ctx context.Context, config *nodebuilder.Config) context.Context

WithNodeConfig sets the node config in the Env.

func WithNodeOptions

func WithNodeOptions(ctx context.Context, opts ...fx.Option) context.Context

WithNodeOptions add new options to Env.

func WithNodeType

func WithNodeType(ctx context.Context, tp node.Type) context.Context

WithNodeType sets the node type in the given context.

func WithStorePath

func WithStorePath(ctx context.Context, storePath string) context.Context

WithStorePath sets Store Path in the given context.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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