config

package
v0.0.0-...-0bdae87 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SentryEndpoint      string              `yaml:"sentry_endpoint"`
	Database            Database            `yaml:"database"`
	ServerHTTP          HTTP                `yaml:"server"`
	Targets             map[string]Target   `yaml:"targets"`
	BatchSize           int                 `yaml:"batch_size"`
	ProcessingIntervals ProcessingIntervals `yaml:"processing_intervals"`
	MaxEventsPerBatch   int                 `yaml:"max_events_per_batch"`
	UseEventTriggers    bool                `yaml:"use_event_triggers"`
}

func New

func New() *Config

func (Config) InvalidProcessingIntervals

func (c Config) InvalidProcessingIntervals() bool

func (*Config) ReadFromFile

func (c *Config) ReadFromFile(path string) error

Open YAML file from path and unmarshal its content inside Config object itself

type Database

type Database struct {
	Name     string
	Database string
	Hostname string
	Username string
	Password string
	Port     int
	Options  map[string]string
}

Database definition

type HTTP

type HTTP struct {
	Hostname string `yaml:"hostname"`
	Port     int    `yaml:"port"`
}

Define HTTP server config

type ProcessingIntervals

type ProcessingIntervals struct {
	Batcher     int `yaml:"batcher"`
	Transmitter int `yaml:"transmitter"`
	Applier     int `yaml:"applier"`
	Vacuum      int `yaml:"vacuum"`
	DdlWatcher  int `yaml:"ddlwatcher"`
}

type Target

type Target struct {
	TargetExpression string `yaml:"target_expression"`
	Endpoint         HTTP   `yaml:"endpoint"`
	ApplySchema      string `yaml:"apply_schema"`
}

Define target

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL