Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWatchManagerBySessionBg ¶
func NewWatchManagerBySessionBg(session *mcclient.ClientSession, callback func(man *SWatchManager) error)
Types ¶
type EventHandler ¶
type EventHandlerFuncs ¶
type EventHandlerFuncs struct { AddFunc func(obj *jsonutils.JSONDict) UpdateFunc func(oldObj, newObj *jsonutils.JSONDict) DeleteFunc func(obj *jsonutils.JSONDict) }
func (EventHandlerFuncs) OnAdd ¶
func (r EventHandlerFuncs) OnAdd(obj *jsonutils.JSONDict)
func (EventHandlerFuncs) OnDelete ¶
func (r EventHandlerFuncs) OnDelete(obj *jsonutils.JSONDict)
func (EventHandlerFuncs) OnUpdate ¶
func (r EventHandlerFuncs) OnUpdate(oldObj, newObj *jsonutils.JSONDict)
type FilteringEventHandler ¶
type FilteringEventHandler struct { FilterFunc func(obj *jsonutils.JSONDict) bool Handler EventHandler }
func (FilteringEventHandler) OnAdd ¶
func (r FilteringEventHandler) OnAdd(obj *jsonutils.JSONDict)
func (FilteringEventHandler) OnDelete ¶
func (r FilteringEventHandler) OnDelete(obj *jsonutils.JSONDict)
func (FilteringEventHandler) OnUpdate ¶
func (r FilteringEventHandler) OnUpdate(oldObj, newObj *jsonutils.JSONDict)
type IResourceManager ¶
type IWatcher ¶
type IWatcher interface {
AddEventHandler(ctx context.Context, handler EventHandler) error
}
type SWatchManager ¶
type SWatchManager struct {
// contains filtered or unexported fields
}
func NewWatchManager ¶
func NewWatchManager(client *mcclient.Client, token mcclient.TokenCredential, region, interfaceType string) (*SWatchManager, error)
func NewWatchManagerBySession ¶
func NewWatchManagerBySession(session *mcclient.ClientSession) (*SWatchManager, error)
func (*SWatchManager) For ¶
func (man *SWatchManager) For(resMan IResourceManager) IWatcher
Click to show internal directories.
Click to hide internal directories.