Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_ADDR = "127.0.0.1:32084" DEFAULT_DATASOURCE_URL = "mongodb://localhost:27017" DEFAULT_DB = "etre_dev" DEFAULT_DB_CONNECT_TIMEOUT = "5s" DEFAULT_DB_QUERY_TIMEOUT = "2s" DEFAULT_DB_MIN_CONN = 10 DEFAULT_DB_MAX_CONN = 1000 DEFAULT_CDC_WRITE_RETRY_COUNT = 2 DEFAULT_CDC_WRITE_RETRY_WAIT = 2 DEFAULT_CDC_FALLBACK_FILE = "/tmp/etre-cdc.json" DEFAULT_CHANGESTREAM_BUFFER_SIZE = 100 DEFAULT_CHANGESTREAM_MAX_CLIENTS = 100 DEFAULT_ENTITY_TYPE = "host" DEFAULT_QUERY_LATENCY_SLA = "1s" DEFAULT_QUERY_PROFILE_SAMPLE_RATE = 0.2 DEFAULT_QUERY_PROFILE_REPORT_THRESHOLD = "500ms" )
View Source
const CDC_COLLECTION = "cdc"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CDCConfig ¶
type CDCConfig struct { Disabled bool `yaml:"disabled"` Datasource DatasourceConfig `yaml:"datasource"` // If set, CDC events will attempt to be written to this file if they cannot // be written to mongo. FallbackFile string `yaml:"fallback_file"` // Number of times CDC events will retry writing to mongo in the event of an error. WriteRetryCount int `yaml:"write_retry_count"` // Wait time in milliseconds between write retry events. WriteRetryWait int `yaml:"write_retry_wait"` // milliseconds ChangeStream ChangeStreamConfig `yaml:"change_stream"` }
type ChangeStreamConfig ¶ added in v0.11.0
type Config ¶
type Config struct { Server ServerConfig `yaml:"server"` Datasource DatasourceConfig `yaml:"datasource"` Entity EntityConfig `yaml:"entity"` CDC CDCConfig `yaml:"cdc"` Security SecurityConfig `yaml: "security"` Metrics MetricsConfig `yaml:"metrics"` }
type DatasourceConfig ¶
type DatasourceConfig struct { URL string `yaml:"url"` Database string `yaml:"database"` ConnectTimeout string `yaml:"connect_timeout"` QueryTimeout string `yaml:"query_timeout"` MinConnections uint64 `yaml:"min_connections"` MaxConnections uint64 `yaml:"max_connections"` // Certs TLSCert string `yaml:"tls_cert"` TLSKey string `yaml:"tls_key"` TLSCA string `yaml:"tls_ca"` // Credentials Username string `yaml:"username"` Password string `yaml:"password"` Source string `yaml:"source"` Mechanism string `yaml:"mechanism"` }
func (DatasourceConfig) WithDefaults ¶ added in v0.11.0
func (c DatasourceConfig) WithDefaults(d DatasourceConfig) DatasourceConfig
type EntityConfig ¶
type EntityConfig struct {
Types []string `yaml:"types"`
}
type MetricsConfig ¶
type SecurityConfig ¶ added in v0.11.0
type SecurityConfig struct {
ACL []ACL `yaml:"acl"`
}
Click to show internal directories.
Click to hide internal directories.