config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 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 {
	Redis struct {
		Addr string `json:"addr"`
	} `json:"redis"`

	API struct {
		HeartbeatPath string `json:"heartbeat_path"`
	} `json:"api"`

	Processor struct {
		StorageDir     string            `json:"storage_dir"`
		RequestHeaders map[string]string `json:"request_headers"`
		StatsInterval  int               `json:"stats_interval"`
	} `json:"processor"`

	Notifier struct {
		DownloadURL      string `json:"download_url"`
		Concurrency      int    `json:"concurrency"`
		StatsInterval    int    `json:"stats_interval"`
		DeletionInterval int    `json:"deletion_interval"`
	} `json:"notifier"`

	Backends map[string]map[string]interface{}
}

Config holds the app's configuration

func Parse

func Parse(filename string) (Config, error)

Parse loads a given file name and creates a Configuration

Jump to

Keyboard shortcuts

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