config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppGateConfigUnmarshalYAML            = sdkerrors.Register(codespace, 2100, "config reader cannot unmarshal yaml content")
	ErrAppGateConfigEmptySigningKey          = sdkerrors.Register(codespace, 2101, "empty signing key in AppGateServer config")
	ErrAppGateConfigInvalidListeningEndpoint = sdkerrors.Register(codespace, 2102, "invalid listening endpoint in AppGateServer config")
	ErrAppGateConfigInvalidQueryNodeGRPCUrl  = sdkerrors.Register(codespace, 2103, "invalid query node grpc url in AppGateServer config")
	ErrAppGateConfigInvalidQueryNodeRPCUrl   = sdkerrors.Register(codespace, 2104, "invalid query node rpc url in AppGateServer config")
	ErrAppGateConfigEmpty                    = sdkerrors.Register(codespace, 2105, "empty AppGateServer config")
)

Functions

This section is empty.

Types

type AppGateServerConfig

type AppGateServerConfig struct {
	ListeningEndpoint *url.URL
	Metrics           *AppGateServerMetricsConfig
	QueryNodeGRPCUrl  *url.URL
	QueryNodeRPCUrl   *url.URL
	SelfSigning       bool
	SigningKey        string
	Pprof             *AppGateServerPprofConfig
}

AppGateServerConfig is the structure describing the AppGateServer config

func ParseAppGateServerConfigs

func ParseAppGateServerConfigs(configContent []byte) (*AppGateServerConfig, error)

ParseAppGateServerConfigs parses the stake config file into a AppGateConfig NOTE: If SelfSigning is not defined in the config file, it will default to false

type AppGateServerMetricsConfig

type AppGateServerMetricsConfig struct {
	Enabled bool
	Addr    string
}

AppGateServerMetricsConfig is the structure resulting from parsing the metrics section of the AppGateServer config file.

type AppGateServerPprofConfig

type AppGateServerPprofConfig struct {
	Enabled bool
	Addr    string
}

AppGateServerPprofConfig is the structure resulting from parsing the pprof section of the AppGateServer config file.

type YAMLAppGateServerConfig

type YAMLAppGateServerConfig struct {
	ListeningEndpoint string                         `yaml:"listening_endpoint"`
	Metrics           YAMLAppGateServerMetricsConfig `yaml:"metrics"`
	QueryNodeGRPCUrl  string                         `yaml:"query_node_grpc_url"`
	QueryNodeRPCUrl   string                         `yaml:"query_node_rpc_url"`
	SelfSigning       bool                           `yaml:"self_signing"`
	SigningKey        string                         `yaml:"signing_key"`
	Pprof             YAMLAppGateServerPprofConfig   `yaml:"pprof"`
}

YAMLAppGateServerConfig is the structure used to unmarshal the AppGateServer config file TODO_DOCUMENT(@red-0ne): Add proper README documentation for yaml config files.

type YAMLAppGateServerMetricsConfig

type YAMLAppGateServerMetricsConfig struct {
	Enabled bool   `yaml:"enabled"`
	Addr    string `yaml:"addr"`
}

YAMLAppGateServerMetricsConfig is the structure used to unmarshal the metrics section of the AppGateServer config file

type YAMLAppGateServerPprofConfig

type YAMLAppGateServerPprofConfig struct {
	Enabled bool   `yaml:"enabled,omitempty"`
	Addr    string `yaml:"addr,omitempty"`
}

YAMLAppGateServerPprofConfig is the structure used to unmarshal the config for `pprof`.

Jump to

Keyboard shortcuts

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