config

package
v0.0.0-...-7c21e21 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdminServerPort  = "ADMIN_PORT"
	NodeServerPort   = "NODE_PORT"
	ActiveServerPort = "ACTIVE_PORT"
)

Variables

This section is empty.

Functions

func SetPortFromEnv

func SetPortFromEnv(cfg *CloudConfig)

Types

type CloudConfig

type CloudConfig struct {
	ActiveServer Server     `` /* 155-byte string literal not displayed */
	AdminServer  Server     `` /* 153-byte string literal not displayed */
	NodeServer   NodeServer `` /* 182-byte string literal not displayed */
	LogInfo      log.Config `yaml:"logger" json:"logger"`
	Plugin       struct {
		PKI       string   `yaml:"pki" json:"pki" default:"defaultpki"`
		Auth      string   `yaml:"auth" json:"auth" default:"defaultauth"`
		License   string   `yaml:"license" json:"license" default:"defaultlicense"`
		Shadow    string   `yaml:"shadow" json:"shadow" default:"database"`
		Objects   []string `yaml:"objects" json:"objects" default:"[]"`
		Functions []string `yaml:"functions" json:"functions" default:"[]"`

		// TODO: deprecated
		ModelStorage    string `yaml:"modelStorage" json:"modelStorage" default:"kubernetes"`
		DatabaseStorage string `yaml:"databaseStorage" json:"databaseStorage" default:"database"`
	} `yaml:"plugin" json:"plugin"`
}

CloudConfig baetyl-cloud config

type NodeServer

type NodeServer struct {
	Server     `yaml:",inline" json:",inline"`
	CommonName string `yaml:"commonName" json:"commonName" default:"common-name"`
}

type Server

type Server struct {
	Port         string            `yaml:"port" json:"port"`
	ReadTimeout  time.Duration     `yaml:"readTimeout" json:"readTimeout" default:"30s"`
	WriteTimeout time.Duration     `yaml:"writeTimeout" json:"writeTimeout" default:"30s"`
	ShutdownTime time.Duration     `yaml:"shutdownTime" json:"shutdownTime" default:"3s"`
	Certificate  utils.Certificate `yaml:",inline" json:",inline"`
}

Server server config

Jump to

Keyboard shortcuts

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