config

package
v0.0.0-...-602aa65 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(cfg *Config, path string) error

Types

type BackendLiteserver

type BackendLiteserver struct {
	Name string
	Addr string
	Key  []byte
}

type CacheConfig

type CacheConfig struct {
	DisableGetMethodsEmulation     bool
	MaxCachedAccountsPerBlock      uint32
	MaxCachedLibraries             uint32
	MaxMasterBlockSeqnoDiffToCache uint32
	MaxShardBlockSeqnoDiffToCache  uint32
}

type ClientConfig

type ClientConfig struct {
	Name           string
	PrivateKey     []byte
	CapacityPerIP  int64
	CapacityPerKey int64
	CoolingPerSec  float64
}

type Config

type Config struct {
	ListenAddr               string
	MetricsAddr              string
	MetricsNamespace         string
	DisableEmulationAndCache bool
	CacheConfig              CacheConfig
	Clients                  []ClientConfig
	Backends                 []BackendLiteserver
	MaxConnectionsPerIP      uint32
	MaxKeepAliveSeconds      uint32
	ResponseGeneralCacheSize uint32
	BalancerType             string
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

Jump to

Keyboard shortcuts

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