Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultSessionLifetime = 24 * time.Hour DefaultGitHubTimeout = 10 * time.Second DefaultWebhookWorkers = 10 DefaultWebhookQueueSize = 100 DefaultHTTPCacheSize = 50 * datasize.MB DefaultPushedAtCacheSize = 100_000 )
View Source
const (
DefaultEnvPrefix = "POLICYBOT_"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachingConfig ¶
type CachingConfig struct {
// The maximum size of the the HTTP cache associated with each GitHub
// client. The total amount of memory used for caching is approximately
// this value multiplied by the total number of active GitHub clients.
MaxSize datasize.ByteSize `yaml:"max_size"`
// The size of the global cache for commit push times. Each entry uses
// roughly 100 bytes of memory.
PushedAtSize int `yaml:"pushed_at_size"`
}
type Config ¶
type Config struct {
Server baseapp.HTTPConfig `yaml:"server"`
Logging LoggingConfig `yaml:"logging"`
Cache CachingConfig `yaml:"cache"`
Github githubapp.Config `yaml:"github"`
Sessions SessionsConfig `yaml:"sessions"`
Options handler.PullEvaluationOptions `yaml:"options"`
Files handler.FilesConfig `yaml:"files"`
Datadog datadog.Config `yaml:"datadog"`
Prometheus prometheus.Config `yaml:"prometheus"`
Workers WorkerConfig `yaml:"workers"`
}
func ParseConfig ¶
type LoggingConfig ¶
type LoggingConfig struct {
Level string `yaml:"level" json:"level"`
Text bool `yaml:"text" json:"text"`
}
func (*LoggingConfig) SetValuesFromEnv ¶ added in v1.27.4
func (c *LoggingConfig) SetValuesFromEnv(prefix string)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
type SessionsConfig ¶
Click to show internal directories.
Click to hide internal directories.