app

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App contains all parts of the service

func New

func New(config *Config) *App

New constructs a new App instance

func (*App) Run

func (app *App) Run(done chan<- bool)

Run starts the main app loop

type Config

type Config struct {
	LogLevel  string
	Period    time.Duration
	Workers   uint64
	SingleRun bool

	SourceConfig  *source.Config
	StorageConfig *storage.Config
	SinkConfig    *sink.Config
}

Config is the main app config. It contains general params and configs for other parts of the app

func LoadConfig

func LoadConfig(filename string) (*Config, error)

LoadConfig returns a new shiny config

func (*Config) HelpLines

func (c *Config) HelpLines() []string

HelpLines returns a string slice with config format help lines

func (*Config) String

func (c *Config) String() string

PrintDebugInfo logs values of it's params for debug purposes

func (*Config) ValidateParams

func (c *Config) ValidateParams() error

ValidateParams validates params for the config

Jump to

Keyboard shortcuts

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