Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Backend struct { Type string `yaml:"type" example:"redis"` // Type of backend to use (redis, inMemory) LoggerConfig zap.Config `yaml:"logger"` LogVerbosity int `yaml:"logVerbosity"` Redis struct { // https://github.com/Go-SQL-Driver/MySQL/?tab=readme-ov-file#dsn-data-source-name URL string `` /* 129-byte string literal not displayed */ MaxJobs uint `yaml:"maxJobs" example:"1000"` FinishedJobTTL uint `yaml:"finishedJobTTL" example:"3600"` // Time to live for finished jobs in seconds } `yaml:"redis"` InMemory struct { MaxJobs uint `yaml:"maxJobs" example:"1000"` WriteFrequency int `yaml:"writeFrequency" example:"300"` EnablePersistantStorage bool `yaml:"enablePersistantStorage"` Directory string `yaml:"directory"` Filename string `yaml:"filename"` } `yaml:"inMemory"` } LoggerConfig zap.Config `yaml:"logger"` Jobs struct { // BulkFlushFrequency int `yaml:"bulkFlushFrequency"` // BulkMaxSize int `yaml:"bulkMaxSize"` // ChannelBufferSize int `yaml:"channelBufferSize"` // MaxIteratorsPerStream int `yaml:"maxAllowedIteratorsPerStream"` // MaxMessagePerGetOperation uint `yaml:"maxMessagePerGetOperation"` LogVerbosity int `yaml:"logVerbosity"` MaxAllowedJobs uint `yaml:"maxAllowedJobs" example:"25"` // Max number of jobs allowed (0 means no limit) JsonSchema struct { Enable bool `yaml:"enable"` // Enable JSON schema validation Path string `yaml:"path"` // Path to JSON schema file } `yaml:"jsonSchema"` DefaultVisibilityTimeout uint `json:"defaultVisibilityTimeout"` // Default duration (in seconds) to keep the job hidden from the queue after it is fetched. MaxVisibilityTimeout uint `json:"maxVisibilityTimeout"` // Maximum duration (in seconds) to keep the job hidden from the queue after it is fetched. RetentionPolicy struct { Enable bool `yaml:"enable"` // Enable retention policy Interval int `yaml:"interval"` // Interval in seconds to check for expired jobs MaxJobAge int `yaml:"maxJobAge"` // The duration to keep the job in the backend after it has been completed MaxJobs int `yaml:"maxJobs"` // The maximum number of jobs to keep in the backend after it has been completed } `yaml:"retentionPolicy"` } `yaml:"jobs"` AuditLog struct { Enable bool `yaml:"enable"` EnableLogAccessGranted bool `yaml:"enableLogAccessGranted"` } WebServer WebServerConfig `yaml:"webserver"` Watchdog WatchdogConfig `yaml:"watchdog"` Consul ConsulConfig `yaml:"consul"` }
func LoadConfig ¶
type ConsulConfig ¶
type ConsulConfig struct { Enable bool `yaml:"enable"` Server struct { Address string `yaml:"address"` // Consul server address of the service (required) Port int `yaml:"port"` // Consul server port of the service (required) Token string `yaml:"token"` // Consul token (optional) ReplaceExistingChecks bool `yaml:"replaceExistingChecks"` // Replace existing checks (default: false) } `yaml:"server"` Service struct { ID string `yaml:"id"` // ID of the service (required) Name string `yaml:"name"` // Name of the service (required) Tags []string `yaml:"tags"` // Tags of the service (optional) Namespace string `yaml:"namespace"` // Consul namespace (optional) (enterprise only) Partition string `yaml:"partition"` // Consul partition (optional) (enterprise only) } `yaml:"service"` HealthCheck struct { Enable bool `yaml:"enable"` CheckId string `yaml:"checkId"` Interval string `yaml:"interval"` Timeout string `yaml:"timeout"` URL string `yaml:"url"` } `yaml:"healthCheck"` }
type WatchdogConfig ¶
type WebServerConfig ¶
type WebServerConfig struct { HTTP struct { Enable bool `yaml:"enable"` Address string `yaml:"address"` } Logs struct { Enable bool `yaml:"enable"` } Cors struct { Enable bool `yaml:"enable"` AllowOrigins string `yaml:"allowOrigins"` AllowHeaders string `yaml:"allowHeaders"` } Monitor struct { Enable bool `yaml:"enable"` } Metrics struct { Enable bool `yaml:"enable"` } Swagger struct { Enable bool `yaml:"enable"` } }
Click to show internal directories.
Click to hide internal directories.