cfg

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: BSD-3-Clause Imports: 8 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// RequestTimeout is the maximum duration to allow an API request to execute
	RequestTimeout   = 15 * time.Second
	HTTPWriteTimeout = 30 * time.Second
	CacheTimeout     = 3 * time.Second

	DefaultConsumeProcessWriteTimeout = 5 * time.Minute

	RequestGetMaxSize = int64(10 * 1024 * 1024)

	MaxSizedList  = 20000
	MaxTxPoolSize = 10000
)

Variables

View Source
var (
	ErrChainsConfigMustBeStringMap = errors.New("Chain config must a string map")
	ErrChainsConfigIDEmpty         = errors.New("Chain config ID is empty")
	ErrChainsConfigVMEmpty         = errors.New("Chain config vm type is empty")
	ErrChainsConfigIDNotString     = errors.New("Chain config ID is not a string")
	ErrChainsConfigAliasNotString  = errors.New("Chain config alias is not a string")
	ErrChainsConfigVMNotString     = errors.New("Chain config vm type is not a string")
)
View Source
var PerformUpdates = false

PerformUpdates controls for performing sql update operations. Disabled by normal operation.

Functions

This section is empty.

Types

type API

type API struct {
	ListenAddr string `json:"listenAddr"`
}

type Chain

type Chain struct {
	ID     string `json:"id"`
	VMType string `json:"vmType"`
}

type Chains

type Chains map[string]Chain

type Config

type Config struct {
	NetworkID         uint32 `json:"networkID"`
	Chains            `json:"chains"`
	Services          `json:"services"`
	MetricsListenAddr string `json:"metricsListenAddr"`
	AdminListenAddr   string `json:"adminListenAddr"`
	Features          map[string]struct{}
	CchainID          string `json:"cchainId"`
	AvalancheGO       string `json:"avalanchego"`
	NodeInstance      string `json:"nodeInstance"`
	AP5Activation     uint64 `json:"ap5Activation"`
	BanffActivation   uint64 `json:"banffActivation"`
}

func NewFromFile

func NewFromFile(filePath string) (*Config, error)

NewFromFile creates a new *Config with the defaults replaced by the config in the file at the given path

type DB

type DB struct {
	DSN    string `json:"dsn"`
	RODSN  string `json:"rodsn"`
	Driver string `json:"driver"`
}

type Filter

type Filter struct {
	Min uint32 `json:"min"`
	Max uint32 `json:"max"`
}

type Services

type Services struct {
	Logging logging.Config `json:"logging"`
	API     `json:"api"`
	*DB     `json:"db"`
}

Jump to

Keyboard shortcuts

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