Documentation
¶
Index ¶
Constants ¶
View Source
const ( WorkerNameConfirmJob = "confirm-job" WorkerNameCreateTask = "create-task" WorkerNameReconcile = "reconcile" WorkerNameNotifyEvent = "notify-event" )
Variables ¶
View Source
var ( ErrEmptyRegion = errors.New("region must not be empty") ErrNilConnection = errors.New("connection configuration is missing") ErrUnsupportedConnectionType = errors.New("connection type is not supported") ErrNilAuth = errors.New("authentication configuration is missing") ErrUnsupportedAuthType = errors.New("authentication type is not supported") ErrAMQPConfigMissing = errors.New("AMQP configuration is missing") ErrEmptyURL = errors.New("URL must not be empty") ErrEmptySource = errors.New("source must not be empty") ErrEmptyTarget = errors.New("target must not be empty") ErrEmptyCAFile = errors.New("CA file must not be empty") ErrEmptyCertFile = errors.New("certificate file must not be empty") ErrEmptyKeyFile = errors.New("key file must not be empty") ErrEmptyWorkerName = errors.New("worker name must not be empty") ErrExecIntervalMustBeGreaterThanZero = errors.New("worker exec interval must be greater than zero") ErrUnsupportedWorkerName = errors.New("worker name is not supported, please use one of the predefined worker names (confirm-job, create-task, reconcile, notify-event)") ErrNumberOfWorkersMustBeGreaterThanZero = errors.New("number of workers must be greater than zero") ErrTimeoutMustBeGreaterThanZero = errors.New("timeout must be greater than zero") ErrConfirmJobAfterMustBeEqualGreaterThanZero = errors.New("confirm job delay must be equal or greater than zero") ErrTaskLimitNumMustBeGreaterThanZero = errors.New("task limit number must be greater than zero") ErrMaxReconcileCountMustBeGreaterThanZero = errors.New("max reconcile count must be greater than zero") ErrBackoffBaseIntervalMustBeGreaterThanZero = errors.New("backoff base interval must be greater than zero") ErrBackoffMaxIntervalMustBeGreaterThanZero = errors.New("backoff max interval must be greater than zero") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
commoncfg.BaseConfig `mapstructure:",squash"`
// gRPC server configuration
GRPCServer GRPCServer `yaml:"grpcServer"`
// Database configuration
Database DB `yaml:"database" json:"database"`
// Orbital configuration
Orbital Orbital `yaml:"orbital" json:"orbital"`
// Validations configuration
Validations []validation.ConfigField `yaml:"validations"`
}
Config holds all application configuration parameters.
type Connection ¶
type Connection struct {
Type ConnectionType `yaml:"type" json:"type"`
AMQP *AMQP `yaml:"amqp" json:"amqp"`
Auth Auth `yaml:"auth" json:"auth"`
}
type ConnectionType ¶
type ConnectionType string
const (
ConnectionTypeAMQP ConnectionType = "amqp"
)
type DB ¶
type DB struct {
Host string `yaml:"host" json:"host"`
User commoncfg.SourceRef `yaml:"user" json:"user"`
Password commoncfg.SourceRef `yaml:"password" json:"password"`
Name string `yaml:"name" json:"name"` // database name
Port string `yaml:"port" json:"port"`
LogLevel int `yaml:"logLevel" json:"logLevel" default:"1"`
}
DB holds DB config.
type GRPCServer ¶
type GRPCServer struct {
commoncfg.GRPCServer `mapstructure:",squash"`
// also embed client attributes for the gRPC health check client
Client commoncfg.GRPCClient `yaml:"client" json:"client"`
}
GRPCServer configuration.
type Orbital ¶
type Orbital struct {
ConfirmJobAfter time.Duration `yaml:"confirmJobAfter" json:"confirmJobAfter"`
TaskLimitNum int `yaml:"taskLimitNum" json:"taskLimitNum"`
MaxReconcileCount int64 `yaml:"maxReconcileCount" json:"maxReconcileCount"`
BackoffBaseIntervalSec int64 `yaml:"backoffBaseIntervalSec" json:"backoffBaseIntervalSec"`
BackoffMaxIntervalSec int64 `yaml:"backoffMaxIntervalSec" json:"backoffMaxIntervalSec"`
Targets []Target `yaml:"targets" json:"targets"`
Workers []Worker `yaml:"workers" json:"workers"`
}
type Target ¶
type Target struct {
Region string `yaml:"region" json:"region"`
Connection *Connection `yaml:"connection" json:"connection"`
}
Click to show internal directories.
Click to hide internal directories.