Documentation ¶
Index ¶
- Variables
- func AddFlags(category string, config interface{})
- func Err() error
- func NewService() (*service.Service, error)
- func Parse() error
- func Parsed() bool
- func SetAppName(name string)
- func SetEnvPrefix(prefix string)
- func SetFileName(name string)
- func SetFilePaths(paths ...string)
- type Cfgo
- type DefaultValue
- type Flag
Constants ¶
This section is empty.
Variables ¶
View Source
var ServiceConfig struct { Server string `name:"server" short:"s" description:"Nexus [tcp|ssl|ws|wss]://host[:port]"` User string `name:"user" short:"u" description:"Nexus username"` Password string `name:"pass" short:"p" description:"Nexus password"` Prefix string `name:"prefix" description:"Nexus listen prefix"` Pulls int `name:"pulls" description:"Number of concurrent nexus task pulls" default:"1"` PullTimeout float64 `name:"pull-timeout" description:"Timeout for a nexus task to be pulled" default:"3600"` MaxThreads int `name:"max-threads" description:"Maximum number of threads running concurrently" default:"-1"` StatsPeriod float64 `name:"stats-period" description:"Period in seconds for the service stats to be printed if debug is enabled" default:"300"` GracefulExitTime float64 `name:"graceful-exit" description:"Timeout for a graceful exit" default:"20"` LogLevel string `name:"log-level" description:"Log level (debug, info, warn, error, fatal, panic)" default:"info"` }
Functions ¶
func NewService ¶
NewService creates a new nexus service from config If the config hasn't been parsed, it will be automatically parsed and return any error
func SetAppName ¶
func SetAppName(name string)
func SetEnvPrefix ¶
func SetEnvPrefix(prefix string)
func SetFileName ¶
func SetFileName(name string)
func SetFilePaths ¶
func SetFilePaths(paths ...string)
Types ¶
type Cfgo ¶
type Cfgo struct { Name string EnvPrefix string FileName string FilePaths []string // contains filtered or unexported fields }
var Config *Cfgo
type DefaultValue ¶
type DefaultValue struct {
Value string
}
Click to show internal directories.
Click to hide internal directories.