cloudcommon

package
v2.1.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDB

func CloseDB()

func InitApp

func InitApp(options *Options) *appsrv.Application

func InitAuth

func InitAuth(options *Options, authComplete auth.AuthCompletedCallback)

func InitDB

func InitDB(options *DBOptions)

func ParseOptions

func ParseOptions(optStruct interface{}, optionsRef *Options, args []string, configFileName string)

func ServeForever

func ServeForever(app *appsrv.Application, options *Options)

Types

type DBOptions

type DBOptions struct {
	SqlConnection string `help:"SQL connection string"`
	AutoSyncTable bool   `help:"Automatically synchronize table changes if differences are detected"`

	Options
}

func (*DBOptions) GetDBConnection

func (this *DBOptions) GetDBConnection() (dialect, connstr string, err error)

type Options

type Options struct {
	Port    int    `help:"The port that the service runs on"`
	Address string `help:"The IP address to serve on (set to 0.0.0.0 for all interfaces)" default:"0.0.0.0"`

	LogLevel        string `help:"log level" default:"info" choices:"debug|info|warn|error"`
	LogVerboseLevel int    `help:"log verbosity level" default:"0"`

	Region             string   `help:"Region name or ID"`
	AuthURL            string   `help:"Keystone auth URL" alias:"auth-uri"`
	AdminUser          string   `help:"Admin username"`
	AdminDomain        string   `help:"Admin user domain"`
	AdminPassword      string   `help:"Admin password"`
	AdminProject       string   `help:"Admin project" default:"system" alias:"admin-tenant-name"`
	CorsHosts          []string `help:"List of hostname that allow CORS"`
	AuthTokenCacheSize uint32   `help:"Auth token Cache Size" default:"2048"`

	ApplicationID      string `help:"Application ID"`
	RequestWorkerCount int    `default:"4" help:"Request worker thread count, default is 4"`

	NotifyAdminUser string `default:"sysadmin" help:"System administrator user ID or name to notify"`

	GlobalVirtualResourceNamespace bool `help:"Per project namespace or global namespace for virtual resources"`
	DebugSqlchemy                  bool `default:"False" help:"Print SQL executed by sqlchemy"`

	structarg.BaseOptions
}

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

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