configspec
Package configspec provides the embedded luxd configuration specification.
import "github.com/luxfi/sdk/configspec"Package configspec provides the embedded luxd configuration specification.
Deprecated: Use github.com/luxfi/config/spec instead. This package will be removed in a future release. The canonical location for configspec is now github.com/luxfi/config/spec.
This is a snapshot of the node's configuration spec for use by SDK consumers without requiring a dependency on the node package.
The spec.json file is generated from the node using:
go run github.com/luxfi/node/cmd/config dump-spec --format=json > spec.json
To regenerate, run:
go generate ./...
Functions
AllKeys
func AllKeys() []stringAllKeys returns all known configuration keys.
KnownKey
func KnownKey(key string) boolKnownKey checks if a key is a valid configuration flag.
NodeVersion
func NodeVersion() stringNodeVersion returns the node version this spec was generated from.
Version
func Version() stringVersion returns the spec version.
Types
Category
Category groups related configuration flags.
ConfigSpec
ConfigSpec is the complete specification of all luxd configuration flags.
func MustSpec() *ConfigSpecfunc Spec() (*ConfigSpec, error)func (s *ConfigSpec) AllKeys() []stringfunc (s *ConfigSpec) DeprecatedFlags() []FlagSpecfunc (s *ConfigSpec) FlagsByCategory(cat Category) []FlagSpecfunc (s *ConfigSpec) GetFlag(key string) *FlagSpecfunc (s *ConfigSpec) KnownKey(key string) boolConstraints
Constraints defines validation rules for a flag.
FlagSpec
FlagSpec describes a single configuration flag.
FlagType
FlagType represents the type of a configuration flag.