config

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	Persist            bool           `json:"persist,omitempty"`
	WriteInterval      string         `json:"writeInterval,omitempty"`
	WriteLocation      string         `json:"writeLocation,omitempty"`
	SuccessAge         string         `json:"successAge,omitempty"`
	SuccessAgeDuration *time.Duration `json:"successAgeDuration,omitempty"`
	FailedAge          string         `json:"failedAge,omitempty"`
	FailedAgeDuration  *time.Duration `json:"failedAgeDuration,omitempty"`
}

type Config

type Config struct {
	Cache      Cache      `json:"cache,omitempty"`
	APIKey     string     `json:"apiKey,omitempty"`
	Port       int        `json:"port,omitempty"`
	Debugging  bool       `json:"debugging,omitempty"`
	Prometheus Prometheus `json:"prometheus,omitempty"`
}

func ReadConfig

func ReadConfig(configLocation string) (Config, error)

type Prometheus

type Prometheus struct {
	Enabled bool `json:"enabled,omitempty"`
	Port    int  `json:"port,omitempty"`
}

Jump to

Keyboard shortcuts

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