Documentation
¶
Index ¶
- func SendAndSubstractUint32(metric string, v *uint32, send StatCallback)
- func SendAndSubstractUint64(metric string, v *uint64, send StatCallback)
- func SendAndZeroIfNotUpdatedUint32(metric string, v *uint32, send StatCallback)
- func SendUint32(metric string, v *uint32, send StatCallback)
- func SendUint64(metric string, v *uint64, send StatCallback)
- type StatCallback
- type Stoppable
- type StoppableInterface
- type ThrottleTicker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendAndSubstractUint32 ¶ added in v0.8.0
func SendAndSubstractUint32(metric string, v *uint32, send StatCallback)
func SendAndSubstractUint64 ¶ added in v0.9.0
func SendAndSubstractUint64(metric string, v *uint64, send StatCallback)
func SendAndZeroIfNotUpdatedUint32 ¶ added in v0.8.0
func SendAndZeroIfNotUpdatedUint32(metric string, v *uint32, send StatCallback)
func SendUint32 ¶ added in v0.9.0
func SendUint32(metric string, v *uint32, send StatCallback)
func SendUint64 ¶ added in v0.9.0
func SendUint64(metric string, v *uint64, send StatCallback)
Types ¶
type StatCallback ¶ added in v0.8.1
type Stoppable ¶
type Stoppable struct { sync.RWMutex Go func(callable func(exit chan bool)) WithExit func(callable func(exit chan bool)) // contains filtered or unexported fields }
Stoppable is abstract class with Start/Stop methods
type StoppableInterface ¶
type StoppableInterface interface { }
type ThrottleTicker ¶ added in v0.17.0
ThrottleTicker is a ticker that can be used for hard or soft rate-limiting.
A soft rate limiter will send a message on C at the actual rate that is specified.
A hard rate limiter may send arbitrarily many messages on C every second, but it will send the value 'true' with the first ratePerSec ones, and 'false' with all subsequent ones, until the next second. It is up to the user to decide what to do in each case.
func NewHardThrottleTicker ¶ added in v0.17.0
func NewHardThrottleTicker(ratePerSec int) *ThrottleTicker
NewHardThrottleTicker returns a new hard throttle ticker.
func NewThrottleTicker ¶ added in v0.17.0
func NewThrottleTicker(ratePerSec int) *ThrottleTicker
NewThrottleTicker returns a new soft throttle ticker.
Directories
¶
Path | Synopsis |
---|---|
Package carbonpb is a generated protocol buffer package.
|
Package carbonpb is a generated protocol buffer package. |
Package carbonzipperpb is a generated protocol buffer package.
|
Package carbonzipperpb is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.