config

package
v0.0.0-...-f5bf215 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config defines the config for the binary. For Gardener, the intent is to provide the config.yml file through config map.

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConfig = errors.New("no config file given")

Functions

This section is empty.

Types

type Datasets

type Datasets struct {
	Tmp  string `yaml:"tmp"`
	Raw  string `yaml:"raw"`
	Join string `yaml:"join"`
}

Datasets contains the name of BigQuery datasets used for temporary, raw, or joined tables.

type Gardener

type Gardener struct {
	StartDate time.Time      `yaml:"start_date"`
	Tracker   TrackerConfig  `yaml:"tracker"`
	Monitor   MonitorConfig  `yaml:"monitor"`
	Sources   []SourceConfig `yaml:"sources"`
}

Gardener is the full config for a Gardener instance.

func ParseConfig

func ParseConfig(name string) (*Gardener, error)

ParseConfig loads the full Config, or Exits on failure.

func (*Gardener) Start

func (g *Gardener) Start() time.Time

StartDate returns the first date that should be processed.

type MonitorConfig

type MonitorConfig struct {
	PollingInterval time.Duration `yaml:"polling_interval"`
}

MonitorConfig holds the config for the state machine monitor.

type SourceConfig

type SourceConfig struct {
	Bucket      string   `yaml:"bucket"`
	Experiment  string   `yaml:"experiment"`
	Datatype    string   `yaml:"datatype"`
	Filter      string   `yaml:"filter"`
	Datasets    Datasets `yaml:"target_datasets"`
	DailyOnly   bool     `yaml:"daily_only"`
	FullHistory bool     `yaml:"full_history"` // FullHistory = true implies DailyOnly = false.
}

SourceConfig holds the config that defines all data sources to be processed.

type TrackerConfig

type TrackerConfig struct {
	Timeout time.Duration `yaml:"timeout"`
}

TrackerConfig holds the config for the job tracker.

Jump to

Keyboard shortcuts

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