Documentation
¶
Index ¶
Constants ¶
View Source
const ( PkgCache = "cache" PkgDatabase = "database" PkgClient = "client" PkgServer = "server" PkgStorage = "storage" PkgMiddleware = "middleware" PkgLogger = "logger" PkgExternal = "external" )
View Source
const ( ModuleController = "controller" ModuleRepository = "repository" ModuleService = "service" ModuleMiddleware = "middleware" ModuleModule = "module" ModuleCustom = "custom" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IConfig ¶
type IConfig interface {
Init(app IEngine) error
Stop() error
Has(key string) bool
GetString(key string, def string) string
GetBool(key string, def bool) bool
GetInt(key string, def int) int
GetFloat(key string, def float64) float64
GetMapString(key string, def map[string]string) map[string]string
GetMapBool(key string, def map[string]bool) map[string]bool
GetMapInt(key string, def map[string]int) map[string]int
GetMapFloat(key string, def map[string]float64) map[string]float64
GetMapInterface(key string, def map[string]interface{}) map[string]interface{}
GetSliceString(key string, def []string) []string
GetSliceBool(key string, def []bool) []bool
GetSliceInt(key string, def []int) []int
GetSliceFloat(key string, def []float64) []float64
GetSliceInterface(key string, def []interface{}) []interface{}
GetConfigItem(typeName string, name string) map[string]interface{}
}
type IEngine ¶
type IEngine interface {
Init() error
Stop() error
GetLogger() ILogger
GetConfig() IConfig
SetMetrics(c IMetrics)
SetTrace(c ITrace)
PushPkg(c IPkg) IEngine
GetPkg(typePkg string, key string) IPkg
PushModule(c IModules) IEngine
GetModule(typePkg string, key string) IModules
PushTask(c ITask) IEngine
GetTask(key string) ITask
RemoveTask(key string)
RunTask(key string, args map[string]interface{}) error
}
type ILogger ¶
type ILogger interface {
Init(map[string]interface{}) error
Stop() error
Name() string
Type() string
Debug(ctx context.Context, args ...interface{})
Info(ctx context.Context, args ...interface{})
Warn(ctx context.Context, args ...interface{})
Message(ctx context.Context, args ...interface{})
Error(ctx context.Context, err error)
Fatal(ctx context.Context, err error)
Panic(ctx context.Context, err error)
Parent() interface{}
SetParent(interface{})
}
type IMiddleware ¶
type ITaskRunConfiguration ¶
type ITaskRunConfiguration interface {
}
type TaskRunAfter ¶
type TaskRunAfter struct {
ITaskRunConfiguration
Restart <-chan time.Duration
After time.Duration
}
type TaskRunTime ¶
type TaskRunTime struct {
ITaskRunConfiguration
Restart <-chan time.Time
To time.Time
}
Click to show internal directories.
Click to hide internal directories.