Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrInvalidRoles returns when roles is wrong ErrInvalidRoles = fmt.Errorf("Invalid roles. Options: %v", roles) //ErrInvalidMethod returns when method is wrong ErrInvalidMethod = fmt.Errorf("Invalid method. Options: %v", methods) //ErrInvalidUpstreamProtocol return when usptream is incorrect ErrInvalidUpstreamProtocol = fmt.Errorf("Invalid usptream protocol. Options: %v", upstreamProto) //ErrInvalidListen returns when listen path is wrong ErrInvalidListen = fmt.Errorf("Invalid listen path.") )
View Source
var ( //ErrInvalidRateType returns when Rate type is not correct ErrInvalidRateType = fmt.Errorf("Invalid rate type. Options: %v", rateTypes) )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Port int HealthCheck struct { URLs []tomlURL `toml:"urls"` } `toml:"healthcheck"` TLS struct { Enable Key string `toml:"-"` Cert string `toml:"-"` } Auth struct { Enable } Prometheus struct { Enable Port int } Rate struct { Enable Limit int Type string } Clickhouse struct { Enable Crypt bool } }
type Metrics ¶
type Metrics struct { RTotal prometheus.Collector RUserIP prometheus.Collector RRoute prometheus.Collector RUserAgent prometheus.Collector }
func CreateMetrics ¶
func CreateMetrics() *Metrics
Click to show internal directories.
Click to hide internal directories.