Version: v1.6.0 Latest Latest

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

Go to latest
Published: Sep 18, 2021 License: BSD-3-Clause Imports: 7 Imported by: 6




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

	DefaultConsumeProcessWriteTimeout = 5 * time.Minute

	RequestGetMaxSize = int64(10 * 1024 * 1024)

	ConsumerMaxBytesDefault = 10e8

	MaxSizedList  = 20000
	MaxTxPoolSize = 10000


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.


This section is empty.


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"`

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 Redis

type Redis struct {
	Addr     string `json:"addr"`
	Password string `json:"password"`
	DB       int    `json:"db"`

type Services

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL