Documentation ¶
Index ¶
- Variables
- type Application
- func (e *Application) Cache() storage.AdapterCache
- func (e *Application) GetCasbin() *casbin.SyncedEnforcer
- func (e *Application) GetCrontab() *cronjob.CronJob
- func (e *Application) GetDb() *gorm.DB
- func (e *Application) GetEngine() http.Handler
- func (e *Application) GetRouter() []Router
- func (e *Application) GetStreamMessage(id, stream string, value map[string]interface{}) (storage.Messager, error)
- func (e *Application) Locker() storage.AdapterLocker
- func (e *Application) Queue() storage.AdapterQueue
- func (e *Application) SetCacheAdapter(c storage.AdapterCache)
- func (e *Application) SetCasbin(enforcer *casbin.SyncedEnforcer)
- func (e *Application) SetCrontab(crontab *cronjob.CronJob)
- func (e *Application) SetDb(db *gorm.DB)
- func (e *Application) SetEngine(engine http.Handler)
- func (e *Application) SetLockerAdapter(c storage.AdapterLocker)
- func (e *Application) SetQueueAdapter(c storage.AdapterQueue)
- type Router
- type Routers
Constants ¶
This section is empty.
Variables ¶
View Source
var Runtime = NewApplication()
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func (*Application) GetCasbin ¶
func (e *Application) GetCasbin() *casbin.SyncedEnforcer
func (*Application) GetCrontab ¶
func (e *Application) GetCrontab() *cronjob.CronJob
GetCrontab 获取所有map里的crontab数据
func (*Application) GetStreamMessage ¶
func (e *Application) GetStreamMessage(id, stream string, value map[string]interface{}) (storage.Messager, error)
GetStreamMessage 获取队列需要用的message
func (*Application) SetCacheAdapter ¶
func (e *Application) SetCacheAdapter(c storage.AdapterCache)
SetCacheAdapter 设置缓存
func (*Application) SetCasbin ¶
func (e *Application) SetCasbin(enforcer *casbin.SyncedEnforcer)
func (*Application) SetCrontab ¶
func (e *Application) SetCrontab(crontab *cronjob.CronJob)
SetCrontab 设置对应key的crontab
func (*Application) SetEngine ¶
func (e *Application) SetEngine(engine http.Handler)
SetEngine 设置路由引擎
func (*Application) SetLockerAdapter ¶
func (e *Application) SetLockerAdapter(c storage.AdapterLocker)
SetLockerAdapter 设置分布式锁
func (*Application) SetQueueAdapter ¶
func (e *Application) SetQueueAdapter(c storage.AdapterQueue)
SetQueueAdapter 设置队列适配器
Click to show internal directories.
Click to hide internal directories.