config

package
v0.0.0-...-a65126b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host         string
	Port         int
	Balancer     balancer.Balancer
	Registry     map[string][]string
	ReverseProxy proxy.ReverseProxy
}

Config holds then configured values and objects to be used by the scheduler.

func CreateDefaultConfig

func CreateDefaultConfig() Config

type Handle

type Handle struct {
	Handle string   `json:handle`
	Pkgs   []string `json:pkgs`
}

type JSONConfig

type JSONConfig struct {
	Host          string   `json:"host"`
	Port          int      `json:"port"`
	Balancer      string   `json:"balancer"`
	LoadThreshold int      `json:"load-threshold"`
	Registry      string   `json:"registry"`
	Workers       []string `json:"workers"`
}

JSONConfig holds the data configured via a JSON file. This shall be used to parse the JSON file and create a proper Config struct that dictates the scheduler's behavior.

func LoadConfigFromFile

func LoadConfigFromFile(configFilepath string) JSONConfig

func (JSONConfig) ToConfig

func (c JSONConfig) ToConfig() Config

Jump to

Keyboard shortcuts

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