Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey struct { Key string `mapstructure:"key"` RateLimit RateLimit `mapstructure:"rate_limit"` AllowedHosts []string `mapstructure:"allowed_origins"` //todo: create rate limiter instances here RateLimiter *rate.Limiter }
APIKey main apikey structure (user)
type Auth ¶
type Auth struct { APIKeys []*APIKey `mapstructure:"api_keys"` // contains filtered or unexported fields }
Auth main auth config structure
type Balancer ¶
type Balancer struct { TotalTimeout time.Duration `mapstructure:"total_timeout"` NodeTimeOut time.Duration `mapstructure:"node_timeout"` }
Balancer main Balancer config struct
type Config ¶
type Config struct { LoadedFile string Webserver *Webserver `mapstructure:"webserver"` Balancer *Balancer `mapstructure:"balancer"` Nodes []*Node `mapstructure:"nodes"` }
Config main config struct
func ReadConfig ¶
ReadConfig read config from a yaml file
type Node ¶
type Node struct { Name string `mapstructure:"name"` Chain string `mapstructure:"chain"` Provider string `mapstructure:"provider"` Endpoint string `mapstructure:"endpoint"` Protocol string `mapstructure:"protocol"` RateLimit RateLimit `mapstructure:"rate_limit"` }
Node main Node config struct
Click to show internal directories.
Click to hide internal directories.