config

package
v0.0.0-...-1b70f73 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// C stores the actual configured values
	C = Config{
		HTTPBind:  ":8080",
		GRPCBind:  ":9090",
		MACPrefix: "52:54:00",
	}
)

Functions

func Load

func Load()

Load loads the configuration off the disk

Types

type Config

type Config struct {
	HTTPBind         string                   `json:"http_bind"` // HTTPBind is the address (and port) to bind the REST server to. It should be accessible via the internet, via an https proxy
	GRPCBind         string                   `json:"grpc_bind"`
	DB               string                   `json:"db"` // DB is the postgres database connection string. For example, "dbname=exampledb user=webapp password=webapp"
	PKI              PKI                      `json:"pki"`
	ProvisioningInfo openapi.ProvisioningInfo `json:"provisioning_info"` // ProvisioningInfo is publicly available and used to join new nodes to the cluster
	JWTValidator     middleware.JWTValidator  `json:"jwt_validator"`
	MACPrefix        string                   `json:"mac_prefix"` // MACPrefix will be used as the first half of generated MACs, defaults to the same as libvirt (52:54:00)
}

Config describes all configurable keys

type PKI

type PKI struct {
	Cert string `json:"cert"`
	Key  string `json:"key"`
	CA   string `json:"ca"`
}

Jump to

Keyboard shortcuts

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