config

package
v0.0.0-...-83e6e2d Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 7 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 {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(configPath, differVersion string) (*Config, error)

func (*Config) GetConfig

func (o *Config) GetConfig() *ControllerConfig

func (*Config) ReloadConfig

func (o *Config) ReloadConfig() error

type ControllerConfig

type ControllerConfig struct {
	Namespace                            string          `yaml:"namespace"`
	UnparsedRegistryRequestSleepDuration string          `yaml:"registryRequestSleepDuration,omitempty"`
	GitRemotes                           []GitRemote     `yaml:"remotes,omitempty" validate:"dive,required"`
	Metrics                              MetricsEndpoint `yaml:"metrics"  validate:"required,dive,required"`
	LogLevel                             string          `yaml:"loglevel,omitempty"`
	ParsedRegistryRequestSleepDuration   time.Duration   `yaml:"-"`

	Version string `yaml:"-"`
	// contains filtered or unexported fields
}

ControllerConfig holds required controller configuration

type GitRemote

type GitRemote struct {
	Provider       string `yaml:"provider" validate:"required"`
	Repositoryname string `yaml:"reponame" validate:"required"`
	Username       string `yaml:"username" validate:"required"`
	CustomURL      string `yaml:"customURL,omitempty"`
}

GitRemote struct describes remote config

type MetricsEndpoint

type MetricsEndpoint struct {
	Port int    `yaml:"port"`
	Path string `yaml:"path"`
}

Jump to

Keyboard shortcuts

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