Documentation ¶
Overview ¶
Package config provides the configuration for Janus. All configurations should be set in environment variables.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { Name string `envconfig:"APP_NAME" default:"Janus"` Version string `envconfig:"APP_VERSION" default:"1.0"` }
Application represents a simple application definition
type Credentials ¶
type Credentials struct { Secret string `envconfig:"SECRET" required:"true"` Username string `envconfig:"ADMIN_USERNAME" default:"admin"` Password string `envconfig:"ADMIN_PASSWORD" default:"admin"` }
Credentials represents the credentials that are going to be used by JWT configuration
type Database ¶
type Database struct {
DSN string `envconfig:"DATABASE_DSN"`
}
Database holds the configuration for a database
type Specification ¶
type Specification struct { Port int `envconfig:"PORT"` Debug bool `envconfig:"DEBUG"` LogLevel string `envconfig:"LOG_LEVEL" default:"info"` GraceTimeOut int64 `envconfig:"GRACE_TIMEOUT"` MaxIdleConnsPerHost int `envconfig:"MAX_IDLE_CONNS_PER_HOST"` InsecureSkipVerify bool `envconfig:"INSECURE_SKIP_VERIFY"` StorageDSN string `envconfig:"REDIS_DSN"` // Path of certificate when using TLS CertPathTLS string `envconfig:"CERT_PATH"` // Path of key when using TLS KeyPathTLS string `envconfig:"KEY_PATH"` // Flush interval for upgraded Proxy connections BackendFlushInterval time.Duration `envconfig:"BACKEND_FLUSH_INTERVAL" default:"20ms"` // Defines the time period of how often the idle connections maintained // by the proxy are closed. CloseIdleConnsPeriod time.Duration `envconfig:"CLOSE_IDLE_CONNS_PERIOD"` Database Database Statsd Statsd Credentials Credentials Application Application }
Specification for basic configurations
func (*Specification) IsHTTPS ¶
func (s *Specification) IsHTTPS() bool
Click to show internal directories.
Click to hide internal directories.