Documentation
¶
Index ¶
- func Defaults(keyTag, defaultTag string) mapstructure.DecodeHookFunc
- type Alerting
- type Auth
- type CORS
- type CallStorage
- type Config
- type ConfigMap
- type Configuration
- type DB
- type IngestFilter
- type Logger
- type Metrics
- type Notify
- type NotifyService
- type Partition
- type RateLimit
- type Relay
- type Server
- type StorageBackendConfig
- type StorageDisposition
- type Workers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Defaults ¶
func Defaults(keyTag, defaultTag string) mapstructure.DecodeHookFunc
Types ¶
type Alerting ¶
type Alerting struct {
Enable bool `yaml:"enable" form:"enable"`
LookbackDays uint `yaml:"lookbackDays" form:"lookbackDays"`
HalfLife jsontypes.Duration `yaml:"halfLife" form:"halfLife"`
Recent jsontypes.Duration `yaml:"recent" form:"recent"`
AlertThreshold float64 `yaml:"alertThreshold" form:"alertThreshold"`
Renotify *jsontypes.Duration `yaml:"renotify,omitempty" form:"renotify,omitempty"`
Transcripts uint `yaml:"transcripts" form:"transcripts"`
MaxContext uint `yaml:"maxContext" form:"maxContext"`
CallLengthThreshold jsontypes.Duration `yaml:"callLengthThreshold" form:"callLengthThreshold" default:"4s"`
ContextLookback jsontypes.Duration `yaml:"contextLookback" form:"contextLookback" default:"10m"`
PruneIntervalDays uint `yaml:"pruneIntervalDays" form:"pruneIntervalDays"`
}
type Auth ¶
type Auth struct {
JWTSecret string `yaml:"jwtsecret"`
AllowInsecure map[string]bool `yaml:"allowInsecureFor"`
SameSiteNoneWhenInsecure bool `yaml:"sameSiteNoneForInsecure"`
APIKeyACL *acl.IPConfig `yaml:"apiKeyACL"`
AccessExpiry *time.Duration `yaml:"accessExpiry"`
RefreshExpiry *time.Duration `yaml:"refreshExpiry"`
}
type CallStorage ¶
type CallStorage struct {
OnExhaust *StorageDisposition `yaml:"onExhaust"`
DisablePrune bool `yaml:"disablePrune"`
Backends []StorageBackendConfig `yaml:"backends"`
}
type Config ¶
type Config struct {
Server Server `yaml:"server"`
DB DB `yaml:"db"`
Auth Auth `yaml:"auth"`
Alerting Alerting `yaml:"alerting"`
Ingest []IngestFilter `yaml:"ingest"`
Log []Logger `yaml:"log"`
Notify Notify `yaml:"notify"`
CallStorage CallStorage `yaml:"callStorage"`
Relay []Relay `yaml:"relay"`
Transcription Workers `yaml:"transcription"`
Metrics Metrics `yaml:"metrics"`
}
type Configuration ¶
type Configuration struct {
Config
// contains filtered or unexported fields
}
func New ¶
func New(configFile *string) *Configuration
New creates a new Configuration, but does not read it. configFile is a pointer so that it may be mutated by koanf options.
func (*Configuration) ReadConfig ¶
func (c *Configuration) ReadConfig() error
type IngestFilter ¶
type Notify ¶
type Notify struct {
SubjectTemplate *string `yaml:"subjectTemplate" json:"subjectTemplate"`
BodyTemplate *string `yaml:"bodyTemplate" json:"bodyTemplate"`
Backends []NotifyService `yaml:"backends" json:"backends"`
}
type NotifyService ¶
type RateLimit ¶
type Server ¶
type Server struct {
BaseURL jsontypes.URL `yaml:"baseURL"`
DumpRoutes bool `yaml:"dumpRoutes"`
UseXRealIP bool `yaml:"useXRealIP"`
Listen string `yaml:"listen" default:":3051"`
Public bool `yaml:"public"`
RateLimit RateLimit `yaml:"rateLimit"`
CORS CORS `yaml:"cors"`
AdminSocket *string `yaml:"adminSocket"`
ProfileACL *acl.IPConfig `yaml:"profileACL"`
}
type StorageBackendConfig ¶
type StorageDisposition ¶
type StorageDisposition int
const ( OnErrorNext StorageDisposition = iota OnErrorFail OnErrorDB )
func (*StorageDisposition) UnmarshalText ¶
func (sd *StorageDisposition) UnmarshalText(s []byte) error
Click to show internal directories.
Click to hide internal directories.