Documentation ¶
Index ¶
- func CloseDB()
- func InitApp(options *Options) *appsrv.Application
- func InitAuth(options *Options, authComplete auth.AuthCompletedCallback)
- func InitDB(options *DBOptions)
- func ParseOptions(optStruct interface{}, optionsRef *Options, args []string, ...)
- func ServeForever(app *appsrv.Application, options *Options)
- type DBOptions
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitApp ¶
func InitApp(options *Options) *appsrv.Application
func InitAuth ¶
func InitAuth(options *Options, authComplete auth.AuthCompletedCallback)
func ParseOptions ¶
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"` GlobalVirtualResourceNamespace bool `help:"Per project namespace or global namespace for virtual resources"` DebugSqlchemy bool `default:"False" help:"Print SQL executed by sqlchemy"` Options }
func (*DBOptions) GetDBConnection ¶
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"` TempPath string `help:"Path for store temp file, at least 40G space" default:"/opt/yunion/tmp"` DebugClient bool `help:"Switch on/off mcclient debugs" default:"false"` 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"` EnableSsl bool `help:"Enable https"` SslCertfile string `help:"ssl certification file"` SslKeyfile string `help:"ssl certification key file"` EnableRbac bool `help:"Switch on Role-based Access Control" default:"false"` RbacDebug bool `help:"turn on rbac debug log" default:"false"` RbacPolicySyncPeriodSeconds int `help:"policy sync interval in seconds, default 15 minutes" default:"900"` RbacPolicySyncFailedRetrySeconds int `help:"seconds to wait after a failed sync, default 30 seconds" default:"30"` structarg.BaseOptions }
Click to show internal directories.
Click to hide internal directories.