|
|
@ -38,12 +38,15 @@ type Manager interface {
|
|
|
|
|
|
|
|
|
|
|
|
// RegisterCounter registers a new counter to the manager. The identifier string must not be empty, and unique among other counters.
|
|
|
|
// RegisterCounter registers a new counter to the manager. The identifier string must not be empty, and unique among other counters.
|
|
|
|
RegisterCounter(string) (Counter, error)
|
|
|
|
RegisterCounter(string) (Counter, error)
|
|
|
|
|
|
|
|
// UnregisterCounter unregisters a counter from the manager by its identifier.
|
|
|
|
UnregisterCounter(string) error
|
|
|
|
UnregisterCounter(string) error
|
|
|
|
// GetCounter returns a counter by its identifier.
|
|
|
|
// GetCounter returns a counter by its identifier.
|
|
|
|
GetCounter(string) Counter
|
|
|
|
GetCounter(string) Counter
|
|
|
|
|
|
|
|
|
|
|
|
// RegisterChannel registers a new channel to the manager. The identifier string must not be empty, and unique among other channels.
|
|
|
|
// RegisterChannel registers a new channel to the manager. The identifier string must not be empty, and unique among other channels.
|
|
|
|
RegisterChannel(string) (Channel, error)
|
|
|
|
RegisterChannel(string) (Channel, error)
|
|
|
|
|
|
|
|
// UnregisterCounter unregisters a channel from the manager by its identifier.
|
|
|
|
|
|
|
|
UnregisterChannel(string) error
|
|
|
|
// GetChannel returns a channel by its identifier.
|
|
|
|
// GetChannel returns a channel by its identifier.
|
|
|
|
GetChannel(string) Channel
|
|
|
|
GetChannel(string) Channel
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -90,7 +93,7 @@ func (NoopManager) RegisterCounter(string) (Counter, error) {
|
|
|
|
|
|
|
|
|
|
|
|
// UnregisterCounter implements Manager.
|
|
|
|
// UnregisterCounter implements Manager.
|
|
|
|
func (NoopManager) UnregisterCounter(string) error {
|
|
|
|
func (NoopManager) UnregisterCounter(string) error {
|
|
|
|
return newError("not implemented")
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetCounter implements Manager.
|
|
|
|
// GetCounter implements Manager.
|
|
|
@ -103,6 +106,11 @@ func (NoopManager) RegisterChannel(string) (Channel, error) {
|
|
|
|
return nil, newError("not implemented")
|
|
|
|
return nil, newError("not implemented")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// UnregisterChannel implements Manager.
|
|
|
|
|
|
|
|
func (NoopManager) UnregisterChannel(string) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetChannel implements Manager.
|
|
|
|
// GetChannel implements Manager.
|
|
|
|
func (NoopManager) GetChannel(string) Channel {
|
|
|
|
func (NoopManager) GetChannel(string) Channel {
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|