config

package
v0.0.0-...-8291241 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TVSRole      string = "tvs"
	LBRole       string = "lb"
	RedisRole    string = "redis"
	ObjectdbRole string = "objectdb"

	PossibleRoles = []string{LBRole, TVSRole, RedisRole, ObjectdbRole}
)

internal only

View Source
var APIDomain string
View Source
var APIPort string
View Source
var APIRootDomain string
View Source
var CertificateContactEmail string
View Source
var DNSProvider struct {
	Name string

	ENV map[string]string // see golang lego dns providers example
}
View Source
var DashboardDomain string
View Source
var DashboardRootDomain string
View Source
var EmailProvider struct {
	Name string // awsses

	AWSSES struct {
		Region      string
		PubKey      string
		PrivKey     string
		SourceEmail string
		ReplyTo     []string
	}
}
View Source
var Home string

internally set

View Source
var IsAPI bool

settable in config file

View Source
var IsRunner bool
View Source
var LocalPrivIPUint64 uint32
View Source
var LocalPrivateIP string
View Source
var LocalPubIPUint64 uint32
View Source
var LocalPublicIP string
View Source
var LogLevel string // debug, warn, error, all - default is info
View Source
var NodeDiscovery bool
View Source
var OBJECTDB struct {
	Kind string // sql, mongodb

	SQL struct {
		Syntax string // mysql, postgresql

		Hosts []string // only if nodediscovery is set to false

		Username string
		Password string
		DBName   string
	}
}
View Source
var ObjectStorage struct {
	Name string // awss3

	AWSS3 struct {
		Region  string
		PubKey  string
		PrivKey string
		Bucket  string
	}

	LocalFS struct {
		Path string
	}
}
View Source
var Redis struct {
	IP []string // only if nodediscovery is set to false

	Username string
	Password string
	DB       int
}
View Source
var Region string
View Source
var Runner struct {
	BTRFSMountPoint   string
	OverlayMountPoint string

	// Set one or the other
	UseUnmountedDisks bool
	BTRFSFile         string
	BTRSFileSize      int64

	NonRootUID int
	NonRootGID int

	NonRootUIDStr string
	NonRootGIDStr string

	ToasterPort string

	NetworkInterface string
}
View Source
var ToasterDomain string
View Source
var ToasterDomainSplitted []string
View Source
var ToasterRootDomain string

Functions

func DefaultConfig

func DefaultConfig() map[string]interface{}

func IsLocalIP

func IsLocalIP(ip net.IP) bool

func LoadConfig

func LoadConfig(path string) error

func LoadConfigBytes

func LoadConfigBytes(b []byte, extension string) error

extension is either json or yml

func RegionNodeTxtRecord

func RegionNodeTxtRecord(region, role string) string

func RegionTxtRecord

func RegionTxtRecord() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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