config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrApplicationConfigUnmarshalYAML    = sdkerrors.Register(types.ModuleName, 2100, "config reader cannot unmarshal yaml content")
	ErrApplicationConfigInvalidServiceId = sdkerrors.Register(types.ModuleName, 2101, "invalid serviceId in application config")
	ErrApplicationConfigEmptyContent     = sdkerrors.Register(types.ModuleName, 2102, "empty application config content")
	ErrApplicationConfigInvalidStake     = sdkerrors.Register(types.ModuleName, 2103, "invalid stake amount in application config")
)

Functions

This section is empty.

Types

type ApplicationStakeConfig

type ApplicationStakeConfig struct {
	// StakeAmount is the amount of upokt tokens that the application is willing to stake
	StakeAmount sdk.Coin
	// Services is the list of services that the application is willing to stake for
	Services []*sharedtypes.ApplicationServiceConfig
}

func ParseApplicationConfigs

func ParseApplicationConfigs(configContent []byte) (*ApplicationStakeConfig, error)

ParseApplicationConfig parses the stake config file and returns a slice of ApplicationServiceConfig

type YAMLApplicationConfig

type YAMLApplicationConfig struct {
	StakeAmount string   `yaml:"stake_amount"`
	ServiceIds  []string `yaml:"service_ids"`
}

YAMLApplicationConfig is the structure describing a single service stake entry in the stake config file TODO_DOCUMENT(@red-0ne): Add additional documentation on app config files.

Jump to

Keyboard shortcuts

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