Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Settings)
func GrpcUnaryInterceptor ¶
func GrpcUnaryInterceptor(i grpc.UnaryServerInterceptor) Option
type Settings ¶
type Settings struct { // runtime options GrpcUnaryInterceptor grpc.ServerOption // env config Port int `envconfig:"PORT" default:"8080"` GrpcPort int `envconfig:"GRPC_PORT" default:"8081"` DebugPort int `envconfig:"DEBUG_PORT" default:"6070"` UseStatsd bool `envconfig:"USE_STATSD" default:"true"` StatsdHost string `envconfig:"STATSD_HOST" default:"localhost"` StatsdPort int `envconfig:"STATSD_PORT" default:"8125"` RuntimePath string `envconfig:"RUNTIME_ROOT" default:"/srv/runtime_data/current"` RuntimeSubdirectory string `envconfig:"RUNTIME_SUBDIRECTORY"` LogLevel string `envconfig:"LOG_LEVEL" default:"WARN"` RedisSocketType string `envconfig:"REDIS_SOCKET_TYPE" default:"unix"` RedisUrl string `envconfig:"REDIS_URL" default:"/var/run/nutcracker/ratelimit.sock"` RedisPoolSize int `envconfig:"REDIS_POOL_SIZE" default:"10"` ExpirationJitterMaxSeconds int64 `envconfig:"EXPIRATION_JITTER_MAX_SECONDS" default:"300"` }
func NewSettings ¶
func NewSettings() Settings
Click to show internal directories.
Click to hide internal directories.