Documentation ¶
Index ¶
- Variables
- func ExitWithError(err error)
- func LogEvent(logger *logrus.Logger, event int, ctx interface{}) bool
- func Panicf(format string, args ...interface{}) error
- func Printf(format string, args ...interface{})
- func RPCClient(container service.Container) (*rpc.Client, error)
- func Sprintf(format string, args ...interface{}) string
- func WorkerTable(workers []*rrutil.State) *tablewriter.Table
- type ConfigWrapper
Constants ¶
This section is empty.
Variables ¶
var ( // Colorize enables colors support. Colorize = true )
Functions ¶
func ExitWithError ¶
func ExitWithError(err error)
ExitWithError prints error and exits with error code`.
func LogEvent ¶
LogEvent outputs rr event into given logger and return false if event was not handled.
func Printf ¶
func Printf(format string, args ...interface{})
Printf works identically to fmt.Print but adds `<white+hb>color formatting support for CLI</reset>`.
func Sprintf ¶
Sprintf works identically to fmt.Sprintf but adds `<white+hb>color formatting support for CLI</reset>`.
func WorkerTable ¶
func WorkerTable(workers []*rrutil.State) *tablewriter.Table
WorkerTable renders table with information about rr server workers.
Types ¶
type ConfigWrapper ¶
type ConfigWrapper struct {
// contains filtered or unexported fields
}
ConfigWrapper provides interface bridge between v configs and service.Config.
func LoadConfig ¶
func LoadConfig(cfgFile string, path []string, name string, flags []string, jsonConfig string) (*ConfigWrapper, error)
LoadConfig config and merge it's values with set of flags.
func (*ConfigWrapper) Get ¶
func (w *ConfigWrapper) Get(key string) service.Config
Get nested config section (sub-map), returns nil if section not found.
func (*ConfigWrapper) Unmarshal ¶
func (w *ConfigWrapper) Unmarshal(out interface{}) error
Unmarshal unmarshal config data into given struct.