Documentation
¶
Index ¶
- Constants
- type AtomicLoader
- type AtomicStorer
- type WatchCollector
- func (wc *WatchCollector) CollectWatches()
- func (wc *WatchCollector) CollectorName() string
- func (wc *WatchCollector) Disable()
- func (wc *WatchCollector) Enable()
- func (wc *WatchCollector) GetWatchNames() []string
- func (wc *WatchCollector) InitCollector(controller ds.Controller, config any) error
- func (wc *WatchCollector) PushWatchValue(w *ds.WatchSample)
- func (wc *WatchCollector) RecordWatchValue(name string, tags []string, lock sync.Locker, rval reflect.Value, ...)
- func (wc *WatchCollector) RegisterHook(name string, hook any, flags int)
- func (wc *WatchCollector) RegisterWatchAtomic(name string, atomicVal any, flags int)
- func (wc *WatchCollector) RegisterWatchFunc(name string, getFn any, setFn any, flags int)
- func (wc *WatchCollector) RegisterWatchSync(name string, lock sync.Locker, rval reflect.Value, flags int)
- func (wc *WatchCollector) UnregisterWatch(name string)
- type WatchDecl
Constants ¶
View Source
const MaxWatchVals = 10000
View Source
const MaxWatchWaitTime = 10 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtomicLoader ¶
type AtomicLoader[T any] interface { Load() T }
type AtomicStorer ¶
type AtomicStorer[T any] interface { Store(val T) }
type WatchCollector ¶
type WatchCollector struct {
// contains filtered or unexported fields
}
WatchCollector implements the collector.Collector interface for watch collection
func GetInstance ¶
func GetInstance() *WatchCollector
GetInstance returns the singleton instance of WatchCollector
func (*WatchCollector) CollectWatches ¶
func (wc *WatchCollector) CollectWatches()
CollectWatches collects watch information and sends it to the controller
func (*WatchCollector) CollectorName ¶
func (wc *WatchCollector) CollectorName() string
CollectorName returns the unique name of the collector
func (*WatchCollector) Enable ¶
func (wc *WatchCollector) Enable()
Enable is called when the collector should start collecting data
func (*WatchCollector) GetWatchNames ¶
func (wc *WatchCollector) GetWatchNames() []string
func (*WatchCollector) InitCollector ¶
func (wc *WatchCollector) InitCollector(controller ds.Controller, config any) error
InitCollector initializes the watch collector with a controller and configuration
func (*WatchCollector) PushWatchValue ¶
func (wc *WatchCollector) PushWatchValue(w *ds.WatchSample)
func (*WatchCollector) RecordWatchValue ¶
func (*WatchCollector) RegisterHook ¶
func (wc *WatchCollector) RegisterHook(name string, hook any, flags int)
func (*WatchCollector) RegisterWatchAtomic ¶
func (wc *WatchCollector) RegisterWatchAtomic(name string, atomicVal any, flags int)
func (*WatchCollector) RegisterWatchFunc ¶
func (wc *WatchCollector) RegisterWatchFunc(name string, getFn any, setFn any, flags int)
func (*WatchCollector) RegisterWatchSync ¶
func (*WatchCollector) UnregisterWatch ¶
func (wc *WatchCollector) UnregisterWatch(name string)
type WatchDecl ¶
type WatchDecl struct {
Name string
Tags []string
Flags int // denotes the type of watch (Sync, Func, Atomic)
Lock sync.Locker // for Sync
PtrVal reflect.Value // for Sync
GetFn any // for Func
SetFn any // for Func
HookFn any // for Hook
AtomicVal any // for Atomic (AtomicLoader)
HookSent atomic.Bool
}
Click to show internal directories.
Click to hide internal directories.