config

package
v0.8.29 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package config [used for configuring the package]

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = `` /* 14412-byte string literal not displayed */

DefaultConfig is the config embedded into the app that it will use if not able to fetch any other config

Functions

func NewUpdaterOptionsWithFlags

func NewUpdaterOptionsWithFlags() (updaterMode *bool, destinationPath *string)

NewUpdaterOptionsWithFlags returns updater options initialized with command line flags.

func UpdateLocal

func UpdateLocal(logger *zap.Logger, destinationPath string, configPaths []string, backupConfig []byte)

Types

type Args

type Args = map[string]any

Args is a generic arguments map.

type Config

type Config struct {
	Name   string
	Type   string
	Count  int
	Filter string
	Args   Args
}

Config for a single job.

type MultiConfig

type MultiConfig struct {
	Jobs []Config
}

MultiConfig for all jobs.

func Unmarshal

func Unmarshal(body []byte, format string) *MultiConfig

Unmarshal config encoded with the given format.

type RawMultiConfig

type RawMultiConfig struct {
	Body      []byte
	Encrypted bool
	// contains filtered or unexported fields
}

func FetchRawMultiConfig

func FetchRawMultiConfig(logger *zap.Logger, paths []string, lastKnownConfig *RawMultiConfig) *RawMultiConfig

FetchRawMultiConfig retrieves the current config using a list of paths. Falls back to the last known config in case of errors.

Jump to

Keyboard shortcuts

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