Documentation
¶
Index ¶
- Constants
- Variables
- func AppName() string
- func ValidateClientConfig(conf *ClientConfig) error
- func ValidateServerConfig(_ *ServerConfig) error
- type AlertingConfig
- type Auth
- type ClientConfig
- func (c *ClientConfig) GetAllNamespaceNames() []string
- func (c *ClientConfig) GetNamespaceByName(name string) (*Namespace, error)
- func (c *ClientConfig) GetSelectedNamespaces(namespaceNames ...string) ([]*Namespace, error)
- func (c *ClientConfig) ValidateNamespaceNames(namespaceNames ...string) error
- type Config
- type DBConfig
- type Datastore
- type EventManagerConfig
- type ExternalTablesConfig
- type FeaturesConfig
- type Job
- type LogConfig
- type LogLevel
- type Namespace
- type Optimus
- type Plugins
- type Project
- type Publisher
- type PublisherKafkaConfig
- type ReplayConfig
- type ResourceManager
- type ResourceManagerConfigOptimus
- type Serve
- type ServerConfig
- type TelemetryConfig
- type Version
Constants ¶
View Source
const ( ServerName = "optimus" ClientName = "optimus-cli" )
View Source
const ( DefaultFilename = "optimus.yaml" DefaultConfigFilename = "config.yaml" // default file name for server config DefaultFileExtension = "yaml" DefaultEnvPrefix = "OPTIMUS" EmptyPath = "" )
Variables ¶
View Source
var ( // overridden by the build system BuildVersion = "dev" BuildCommit = "" BuildDate = "" )
View Source
var FS = afero.NewReadOnlyFs(afero.NewOsFs())
Functions ¶
func ValidateClientConfig ¶
func ValidateClientConfig(conf *ClientConfig) error
func ValidateServerConfig ¶
func ValidateServerConfig(_ *ServerConfig) error
Types ¶
type AlertingConfig ¶ added in v0.11.7
type AlertingConfig struct {
EventManager EventManagerConfig `mapstructure:"alert_manager"`
Dashboard string `mapstructure:"dashboard"`
DataConsole string `mapstructure:"data_console"`
EnableSlack bool `mapstructure:"enable_slack"`
EnablePagerDuty bool `mapstructure:"enable_pager_duty"`
}
type ClientConfig ¶
type ClientConfig struct {
Version Version `mapstructure:"version"`
Log LogConfig `mapstructure:"log"`
Host string `mapstructure:"host"` // optimus server host
Project Project `mapstructure:"project"`
Namespaces []*Namespace `mapstructure:"namespaces"`
Auth Auth `mapstructure:"auth"`
// contains filtered or unexported fields
}
func LoadClientConfig ¶
func LoadClientConfig(filePath string) (*ClientConfig, error)
LoadClientConfig load the project specific config from these locations: 1. filepath. ./optimus <client_command> -c "path/to/config/optimus.yaml" 2. current dir. Optimus will look at current directory if there's optimus.yaml there, use it
func (*ClientConfig) GetAllNamespaceNames ¶
func (c *ClientConfig) GetAllNamespaceNames() []string
func (*ClientConfig) GetNamespaceByName ¶
func (c *ClientConfig) GetNamespaceByName(name string) (*Namespace, error)
func (*ClientConfig) GetSelectedNamespaces ¶
func (c *ClientConfig) GetSelectedNamespaces(namespaceNames ...string) ([]*Namespace, error)
func (*ClientConfig) ValidateNamespaceNames ¶
func (c *ClientConfig) ValidateNamespaceNames(namespaceNames ...string) error
type DBConfig ¶
type DBConfig struct {
DSN string `mapstructure:"dsn"` // data source name e.g.: postgres://user:password@host:123/database?sslmode=disable
MinOpenConnection int `mapstructure:"min_open_connection" default:"5"` // minimum open DB connections
MaxOpenConnection int `mapstructure:"max_open_connection" default:"20"` // maximum allowed open DB connections
}
type EventManagerConfig ¶ added in v0.11.7
type ExternalTablesConfig ¶ added in v0.19.0
type ExternalTablesConfig struct {
AccessIssuesRetryInterval int64 `mapstructure:"access_issues_retry_interval_minutes"`
SourceSyncInterval int64 `mapstructure:"source_sync_interval_minutes"`
MaxFileSizeSupported int `mapstructure:"max_drive_file_size_mb"`
DriveFileCleanupSizeLimit int `mapstructure:"drive_file_cleanup_size_limit_mb"`
MaxSyncDelayTolerance int64 `mapstructure:"max_sync_delay_tolerance_hours"`
}
type FeaturesConfig ¶ added in v0.19.0
type FeaturesConfig struct {
EnableV3Sensor bool `mapstructure:"enable_v3_sensor"`
}
type Job ¶
type Job struct {
Path string `mapstructure:"path"` // directory to find specifications
}
type Optimus ¶
type Optimus struct {
// configuration version
Version int `mapstructure:"version"`
// optimus server host
Host string `mapstructure:"host"`
Project Project `mapstructure:"project"`
Namespaces []*Namespace `mapstructure:"namespaces"`
Server Serve `mapstructure:"serve"`
Log LogConfig `mapstructure:"log"`
Telemetry TelemetryConfig `mapstructure:"telemetry"`
Alerting AlertingConfig `mapstructure:"alerting"`
// contains filtered or unexported fields
}
func (*Optimus) GetNamespaceByName ¶
func (*Optimus) GetVersion ¶
type PublisherKafkaConfig ¶ added in v0.7.0
type ReplayConfig ¶ added in v0.7.0
type ReplayConfig struct {
ReplayTimeoutInMinutes int `mapstructure:"replay_timeout_in_minutes" default:"180"`
ExecutionIntervalInSeconds int `mapstructure:"execution_interval_in_seconds" default:"120"`
PluginExecutionProjectConfigNames map[string]string `mapstructure:"plugin_execution_project_config_names"`
}
type ResourceManager ¶
type Serve ¶
type Serve struct {
Port int `mapstructure:"port" default:"9100"` // port to listen on
IngressHost string `mapstructure:"ingress_host"` // service ingress host for jobs to communicate back to optimus
PortGRPC int `mapstructure:"port_grpc"`
IngressHostGRPC string `mapstructure:"ingress_host_grpc"`
AppKey string `mapstructure:"app_key"` // random 32 character hash used for encrypting secrets
DB DBConfig `mapstructure:"db"`
}
type ServerConfig ¶
type ServerConfig struct {
Version Version `mapstructure:"version"`
Log LogConfig `mapstructure:"log"`
Serve Serve `mapstructure:"serve"`
Telemetry TelemetryConfig `mapstructure:"telemetry"`
Alerting AlertingConfig `mapstructure:"alerting"`
ResourceManagers []ResourceManager `mapstructure:"resource_managers"`
Replay ReplayConfig `mapstructure:"replay"`
Publisher *Publisher `mapstructure:"publisher"`
JobSyncIntervalMinutes int `mapstructure:"job_sync_interval_minutes"`
ExternalTables ExternalTablesConfig `mapstructure:"external_tables"`
Features FeaturesConfig `mapstructure:"features"`
Plugins Plugins `mapstructure:"plugins"`
}
func LoadServerConfig ¶
func LoadServerConfig(filePath string) (*ServerConfig, error)
LoadServerConfig load the server specific config from these locations: 1. filepath. ./optimus <server_command> -c "path/to/config.yaml" 2. env var. eg. OPTIMUS_SERVE_PORT, etc 3. executable binary location
type TelemetryConfig ¶
Click to show internal directories.
Click to hide internal directories.