config

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 9 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 {
	QueueMapping map[string]string `json:"queue_mapping"` // nillable, transformation-step output -> message queue
	ConfigFiles  map[string]string `json:"config_files"`
}

Config is the struct holding configurable information This can be set via the environment variable ITERUM_CONFIG

func (*Config) FromString

func (conf *Config) FromString(stringified string) (err error)

FromString converts a string value into an instance of Config and also does validation

func (Config) MapQueue added in v0.1.11

func (conf Config) MapQueue(queue string) (target string, err error)

MapQueue tries to map a transformation step output to a target MQ. If either the map is nil or the key does not exist it returns an error

func (Config) ReturnMatchingFiles added in v0.2.2

func (conf Config) ReturnMatchingFiles(files []string) (matches []string)

ReturnMatchingFiles returns the list of files matching the ConfigSelectors of conf

func (Config) Validate

func (conf Config) Validate() error

Validate does validation of a config struct, ensuring that it's members contain valid values

type Downloader added in v0.2.2

type Downloader struct {
	Config *Config
	Minio  minio.Config
	// contains filtered or unexported fields
}

Downloader is the structure responsible for downloading the config files used by the fragmenter to properly fragment data files

func NewDownloader added in v0.2.2

func NewDownloader(config *Config, minio minio.Config) Downloader

NewDownloader instantiates a new config downloader without starting it

func (*Downloader) Start added in v0.2.2

func (cd *Downloader) Start(wg *sync.WaitGroup)

Start is an asyncrhonous alternative to StartBlocking by spawning a goroutine

func (*Downloader) StartBlocking added in v0.2.2

func (cd *Downloader) StartBlocking()

StartBlocking starts the process of downloading the config files

Jump to

Keyboard shortcuts

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