Documentation ¶
Index ¶
- Constants
- func NewHandler() common.AgentHandler
- type Apollo
- func (a *Apollo) AfterCompletion(ctx context.Context) error
- func (a *Apollo) PostHandle(param *common.HandlerParam, ctx context.Context) error
- func (a *Apollo) PreHandle(ctx context.Context) error
- func (a *Apollo) SetRunMode(mode string)
- func (a *Apollo) WriteData(worker WorkerContract, ctx context.Context)
- type ConfigData
- type DefaultWorker
- func (w *DefaultWorker) CloseChan()
- func (w *DefaultWorker) DeleteDataKey(key string)
- func (w *DefaultWorker) GetChan() chan struct{}
- func (w *DefaultWorker) GetConfig(wg *sync.WaitGroup, ctx context.Context)
- func (w *DefaultWorker) GetData() *sync.Map
- func (w *DefaultWorker) GetMeta() *MetaConfig
- func (w *DefaultWorker) IsAllInOne() bool
- func (w *DefaultWorker) SetMeta(meta *MetaConfig)
- type MetaConfig
- type WorkerContract
Constants ¶
View Source
const TmpFileSuffix = ".tmp"
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
func NewHandler() common.AgentHandler
Types ¶
type Apollo ¶
type Apollo struct { Worker []WorkerContract Wg *sync.WaitGroup // contains filtered or unexported fields }
func (*Apollo) PostHandle ¶
func (*Apollo) SetRunMode ¶
type ConfigData ¶
type DefaultWorker ¶
type DefaultWorker struct { Meta *MetaConfig Data *sync.Map // contains filtered or unexported fields }
func (*DefaultWorker) CloseChan ¶
func (w *DefaultWorker) CloseChan()
func (*DefaultWorker) DeleteDataKey ¶
func (w *DefaultWorker) DeleteDataKey(key string)
func (*DefaultWorker) GetChan ¶
func (w *DefaultWorker) GetChan() chan struct{}
func (*DefaultWorker) GetConfig ¶
func (w *DefaultWorker) GetConfig(wg *sync.WaitGroup, ctx context.Context)
func (*DefaultWorker) GetData ¶
func (w *DefaultWorker) GetData() *sync.Map
func (*DefaultWorker) GetMeta ¶
func (w *DefaultWorker) GetMeta() *MetaConfig
func (*DefaultWorker) IsAllInOne ¶
func (w *DefaultWorker) IsAllInOne() bool
func (*DefaultWorker) SetMeta ¶
func (w *DefaultWorker) SetMeta(meta *MetaConfig)
type MetaConfig ¶
type WorkerContract ¶
type WorkerContract interface { SetMeta(meta *MetaConfig) GetMeta() *MetaConfig GetConfig(wg *sync.WaitGroup, ctx context.Context) GetChan() chan struct{} CloseChan() GetData() *sync.Map DeleteDataKey(key string) IsAllInOne() bool }
func NewDefaultWorker ¶
func NewDefaultWorker(allInOne bool, interval time.Duration, mode string) WorkerContract
Click to show internal directories.
Click to hide internal directories.