mirror of
https://github.com/datarhei/core.git
synced 2025-09-26 20:11:29 +08:00
Add v16.8.0
This commit is contained in:
@@ -24,12 +24,26 @@ type Config struct {
|
||||
|
||||
// The Registry interface
|
||||
type Registry interface {
|
||||
// Register returns a new collector from conf and registers it under the id and error is nil. In case of error
|
||||
// the returned collector is nil and the error is not nil.
|
||||
Register(id string, conf CollectorConfig) (Collector, error)
|
||||
|
||||
// Unregister unregisters the collector with the ID, returns error if the ID is not registered
|
||||
Unregister(id string) error
|
||||
|
||||
// UnregisterAll unregisters al registered collectors
|
||||
UnregisterAll()
|
||||
|
||||
// Collectors returns an array of all registered IDs
|
||||
Collectors() []string
|
||||
|
||||
// Collector returns the collector with the ID, or nil if the ID is not registered
|
||||
Collector(id string) Collector
|
||||
|
||||
// Summary returns the summary from a collector with the ID, or an empty summary if the ID is not registered
|
||||
Summary(id string) Summary
|
||||
|
||||
// Active returns the active sessions from a collector with the ID, or an empty list if the ID is not registered
|
||||
Active(id string) []Session
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user