Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyRouter ¶
DummyRouter implements simple router That will just store everything in a map (with proper locking) It's only useful for unit tests and shouldn't be used in Production
func (*DummyRouter) GetData ¶
func (r *DummyRouter) GetData() map[string]*carbon.Metric
GetData is a special function in DummyRouter that returns all internal data and resets the state
func (*DummyRouter) Reload ¶
func (r *DummyRouter) Reload(senders []transport.Sender, config Config) bool
Reload will try to reload configuration of router. Returns true on success.
func (*DummyRouter) Route ¶
func (r *DummyRouter) Route(payload carbon.Payload)
Route is the endpoint that should receive list of metrics
type Metrics ¶
type Metrics struct { InfiniteRecursions uint64 MetricsRouted uint64 MetricsRewritten uint64 RulesCacheMiss uint64 RulesCacheHit uint64 }
Metrics contains all internal metrics
type RelayRouter ¶
RelayRouter describes internal router state.
func NewRelayRouter ¶
func NewRelayRouter(senders []transport.Sender, config Config) *RelayRouter
NewRelayRouter will create a new router
func (*RelayRouter) Reload ¶
func (r *RelayRouter) Reload(senders []transport.Sender, config Config) bool
Reload will try to reload configuration of router. Returns true on success.
func (*RelayRouter) Route ¶
func (r *RelayRouter) Route(payload carbon.Payload)
Route allows to route bunch of metrics