flags

package
v1.21.41 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRPCFlagToCmd

func AddRPCFlagToCmd(cmd *cobra.Command, app *application.Lux, rpc *string)

func EnsureMutuallyExclusive

func EnsureMutuallyExclusive(flags []bool) bool

func ValidateRPC

func ValidateRPC(app *application.Lux, rpc *string, cmd *cobra.Command, args []string) error

func WithGroupedHelp

func WithGroupedHelp(groups []GroupedFlags) func(cmd *cobra.Command, args []string)

WithGroupedHelp returns a cobra Run function that shows help organized by groups. It first shows normal command usage, then prints grouped flags, hiding some unless explicitly requested.

Types

type BootstrapValidatorFlags

type BootstrapValidatorFlags struct {
	BootstrapValidatorsJSONFilePath string
	GenerateNodeID                  bool
	BootstrapEndpoints              []string
	NumBootstrapValidators          int
	DeployBalanceLUX                float64
	ChangeOwnerAddress              string
	LocalBootstrap                  bool
	NoLocalBootstrap                bool
}

type GroupedFlags

type GroupedFlags struct {
	Name            string
	ShowFlag        string
	FlagSet         *pflag.FlagSet
	IsAlwaysVisible bool
}

func AddBootstrapValidatorFlagsToCmd

func AddBootstrapValidatorFlagsToCmd(cmd *cobra.Command, bootstrapFlags *BootstrapValidatorFlags) GroupedFlags

func AddLocalMachineFlagsToCmd

func AddLocalMachineFlagsToCmd(cmd *cobra.Command, localMachineFlags *LocalMachineFlags) GroupedFlags

func AddProofOfStakeToCmd

func AddProofOfStakeToCmd(cmd *cobra.Command, posFlags *POSFlags) GroupedFlags

func AddSignatureAggregatorFlagsToCmd

func AddSignatureAggregatorFlagsToCmd(cmd *cobra.Command, sigAggFlags *SignatureAggregatorFlags) GroupedFlags

func RegisterFlagGroup

func RegisterFlagGroup(cmd *cobra.Command, groupName string, showFlag string, isAlwaysVisible bool, defineFlags func(set *pflag.FlagSet)) GroupedFlags

type LocalMachineFlags

type LocalMachineFlags struct {
	UseLocalMachine         bool
	PartialSync             bool
	HTTPPorts               []uint
	StakingPorts            []uint
	LuxdBinaryPath          string
	UserProvidedLuxdVersion string
	StakingTLSKeyPaths      []string
	StakingCertKeyPaths     []string
	StakingSignerKeyPaths   []string
}

type POSFlags

type POSFlags struct {
	MinimumStakeAmount     uint64
	MaximumStakeAmount     uint64
	MinimumStakeDuration   uint64
	MinimumDelegationFee   uint16
	MaximumStakeMultiplier uint8
	WeightToValueFactor    uint64
}

type SignatureAggregatorFlags

type SignatureAggregatorFlags struct {
	AggregatorLogLevel    string
	AggregatorLogToStdout bool
}

Jump to

Keyboard shortcuts

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