Documentation ¶
Index ¶
- type CloudWatch
- func (route *CloudWatch) Add(dest *dest.Destination)
- func (route *CloudWatch) DelDestination(index int) error
- func (r *CloudWatch) Dispatch(buf []byte)
- func (r *CloudWatch) Flush() error
- func (route *CloudWatch) GetDestination(index int) (*dest.Destination, error)
- func (route *CloudWatch) Key() string
- func (route *CloudWatch) Match(s []byte) bool
- func (r *CloudWatch) Shutdown() error
- func (r *CloudWatch) Snapshot() Snapshot
- func (route *CloudWatch) Update(opts map[string]string) error
- func (route *CloudWatch) UpdateDestination(index int, opts map[string]string) error
- func (route *CloudWatch) UpdateMatcher(matcher matcher.Matcher)
- type Config
- type ConsistentHasher
- type ConsistentHashing
- func (route *ConsistentHashing) Add(dest *dest.Destination)
- func (route *ConsistentHashing) DelDestination(index int) error
- func (route *ConsistentHashing) Dispatch(buf []byte)
- func (route *ConsistentHashing) Flush() error
- func (route *ConsistentHashing) GetDestination(index int) (*dest.Destination, error)
- func (route *ConsistentHashing) Key() string
- func (route *ConsistentHashing) Match(s []byte) bool
- func (route *ConsistentHashing) Shutdown() error
- func (route *ConsistentHashing) Snapshot() Snapshot
- func (route *ConsistentHashing) Update(opts map[string]string) error
- func (route *ConsistentHashing) UpdateDestination(index int, opts map[string]string) error
- func (route *ConsistentHashing) UpdateMatcher(matcher matcher.Matcher)
- type GrafanaNet
- func (route *GrafanaNet) Add(dest *dest.Destination)
- func (route *GrafanaNet) DelDestination(index int) error
- func (route *GrafanaNet) Dispatch(buf []byte)
- func (route *GrafanaNet) Flush() error
- func (route *GrafanaNet) GetDestination(index int) (*dest.Destination, error)
- func (route *GrafanaNet) Key() string
- func (route *GrafanaNet) Match(s []byte) bool
- func (route *GrafanaNet) Shutdown() error
- func (route *GrafanaNet) Snapshot() Snapshot
- func (route *GrafanaNet) Update(opts map[string]string) error
- func (route *GrafanaNet) UpdateDestination(index int, opts map[string]string) error
- func (route *GrafanaNet) UpdateMatcher(matcher matcher.Matcher)
- type KafkaMdm
- func (route *KafkaMdm) Add(dest *dest.Destination)
- func (route *KafkaMdm) DelDestination(index int) error
- func (r *KafkaMdm) Dispatch(buf []byte)
- func (r *KafkaMdm) Flush() error
- func (route *KafkaMdm) GetDestination(index int) (*dest.Destination, error)
- func (route *KafkaMdm) Key() string
- func (route *KafkaMdm) Match(s []byte) bool
- func (r *KafkaMdm) Shutdown() error
- func (r *KafkaMdm) Snapshot() Snapshot
- func (route *KafkaMdm) Update(opts map[string]string) error
- func (route *KafkaMdm) UpdateDestination(index int, opts map[string]string) error
- func (route *KafkaMdm) UpdateMatcher(matcher matcher.Matcher)
- type MetricsResponse
- type PubSub
- func (route *PubSub) Add(dest *dest.Destination)
- func (route *PubSub) DelDestination(index int) error
- func (r *PubSub) Dispatch(buf []byte)
- func (r *PubSub) Flush() error
- func (route *PubSub) GetDestination(index int) (*dest.Destination, error)
- func (route *PubSub) Key() string
- func (route *PubSub) Match(s []byte) bool
- func (r *PubSub) Shutdown() error
- func (r *PubSub) Snapshot() Snapshot
- func (route *PubSub) Update(opts map[string]string) error
- func (route *PubSub) UpdateDestination(index int, opts map[string]string) error
- func (route *PubSub) UpdateMatcher(matcher matcher.Matcher)
- type Route
- func NewCloudWatch(key, prefix, sub, regex, awsProfile, awsRegion, awsNamespace string, ...) (Route, error)
- func NewConsistentHashing(key, prefix, sub, regex string, destinations []*dest.Destination) (Route, error)
- func NewGrafanaNet(key, prefix, sub, regex, addr, apiKey, schemasFile string, ...) (Route, error)
- func NewKafkaMdm(key, prefix, sub, regex, topic, codec, schemasFile, partitionBy string, ...) (Route, error)
- func NewPubSub(key, prefix, sub, regex, project, topic, format, codec string, ...) (Route, error)
- func NewSendAllMatch(key, prefix, sub, regex string, destinations []*dest.Destination) (Route, error)
- func NewSendFirstMatch(key, prefix, sub, regex string, destinations []*dest.Destination) (Route, error)
- type SendAllMatch
- func (route *SendAllMatch) Add(dest *dest.Destination)
- func (route *SendAllMatch) DelDestination(index int) error
- func (route *SendAllMatch) Dispatch(buf []byte)
- func (route *SendAllMatch) Flush() error
- func (route *SendAllMatch) GetDestination(index int) (*dest.Destination, error)
- func (route *SendAllMatch) Key() string
- func (route *SendAllMatch) Match(s []byte) bool
- func (route *SendAllMatch) Shutdown() error
- func (route *SendAllMatch) Snapshot() Snapshot
- func (route *SendAllMatch) Update(opts map[string]string) error
- func (route *SendAllMatch) UpdateDestination(index int, opts map[string]string) error
- func (route *SendAllMatch) UpdateMatcher(matcher matcher.Matcher)
- type SendFirstMatch
- func (route *SendFirstMatch) Add(dest *dest.Destination)
- func (route *SendFirstMatch) DelDestination(index int) error
- func (route *SendFirstMatch) Dispatch(buf []byte)
- func (route *SendFirstMatch) Flush() error
- func (route *SendFirstMatch) GetDestination(index int) (*dest.Destination, error)
- func (route *SendFirstMatch) Key() string
- func (route *SendFirstMatch) Match(s []byte) bool
- func (route *SendFirstMatch) Shutdown() error
- func (route *SendFirstMatch) Snapshot() Snapshot
- func (route *SendFirstMatch) Update(opts map[string]string) error
- func (route *SendFirstMatch) UpdateDestination(index int, opts map[string]string) error
- func (route *SendFirstMatch) UpdateMatcher(matcher matcher.Matcher)
- type Snapshot
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudWatch ¶ added in v0.11.0
type CloudWatch struct {
// contains filtered or unexported fields
}
Publishes data points to the native AWS metrics service: CloudWatch
func (*CloudWatch) Add ¶ added in v0.11.0
func (route *CloudWatch) Add(dest *dest.Destination)
func (*CloudWatch) DelDestination ¶ added in v0.11.0
func (*CloudWatch) Dispatch ¶ added in v0.11.0
func (r *CloudWatch) Dispatch(buf []byte)
Dispatch is called to submit metrics. They will be in graphite 'plain' format no matter how they arrived.
func (*CloudWatch) Flush ¶ added in v0.11.0
func (r *CloudWatch) Flush() error
Flush is not currently implemented
func (*CloudWatch) GetDestination ¶ added in v0.11.0
func (route *CloudWatch) GetDestination(index int) (*dest.Destination, error)
func (*CloudWatch) Shutdown ¶ added in v0.11.0
func (r *CloudWatch) Shutdown() error
Shutdown stops the CloudWatch publisher and returns with the publisher has finished in-flight work
func (*CloudWatch) Snapshot ¶ added in v0.11.0
func (r *CloudWatch) Snapshot() Snapshot
Snapshot clones the current config for update operations
func (*CloudWatch) UpdateDestination ¶ added in v0.11.0
func (*CloudWatch) UpdateMatcher ¶ added in v0.11.0
type ConsistentHasher ¶
type ConsistentHasher struct { Ring hashRing // contains filtered or unexported fields }
func NewConsistentHasher ¶
func NewConsistentHasher(destinations []*dest.Destination) ConsistentHasher
func NewConsistentHasherReplicaCount ¶
func NewConsistentHasherReplicaCount(destinations []*dest.Destination, replicaCount int) ConsistentHasher
func (*ConsistentHasher) AddDestination ¶
func (h *ConsistentHasher) AddDestination(d *dest.Destination)
func (*ConsistentHasher) GetDestinationIndex ¶
func (h *ConsistentHasher) GetDestinationIndex(key []byte) int
GetDestinationIndex returns the index of the destination corresponding to the provided key.
type ConsistentHashing ¶
type ConsistentHashing struct {
// contains filtered or unexported fields
}
func (*ConsistentHashing) Add ¶
func (route *ConsistentHashing) Add(dest *dest.Destination)
func (*ConsistentHashing) DelDestination ¶
func (route *ConsistentHashing) DelDestination(index int) error
func (*ConsistentHashing) Dispatch ¶
func (route *ConsistentHashing) Dispatch(buf []byte)
func (*ConsistentHashing) GetDestination ¶
func (route *ConsistentHashing) GetDestination(index int) (*dest.Destination, error)
func (*ConsistentHashing) Snapshot ¶
func (route *ConsistentHashing) Snapshot() Snapshot
func (*ConsistentHashing) Update ¶
func (route *ConsistentHashing) Update(opts map[string]string) error
func (*ConsistentHashing) UpdateDestination ¶
func (route *ConsistentHashing) UpdateDestination(index int, opts map[string]string) error
func (*ConsistentHashing) UpdateMatcher ¶
func (route *ConsistentHashing) UpdateMatcher(matcher matcher.Matcher)
type GrafanaNet ¶
type GrafanaNet struct {
// contains filtered or unexported fields
}
func (*GrafanaNet) Add ¶
func (route *GrafanaNet) Add(dest *dest.Destination)
func (*GrafanaNet) DelDestination ¶
func (*GrafanaNet) Dispatch ¶
func (route *GrafanaNet) Dispatch(buf []byte)
Dispatch takes in the requested buf or drops it if blocking mode and queue of the shard is full
func (*GrafanaNet) Flush ¶
func (route *GrafanaNet) Flush() error
func (*GrafanaNet) GetDestination ¶
func (route *GrafanaNet) GetDestination(index int) (*dest.Destination, error)
func (*GrafanaNet) Shutdown ¶
func (route *GrafanaNet) Shutdown() error
func (*GrafanaNet) Snapshot ¶
func (route *GrafanaNet) Snapshot() Snapshot
func (*GrafanaNet) UpdateDestination ¶
func (*GrafanaNet) UpdateMatcher ¶
type KafkaMdm ¶
type KafkaMdm struct {
// contains filtered or unexported fields
}
func (*KafkaMdm) Add ¶
func (route *KafkaMdm) Add(dest *dest.Destination)
func (*KafkaMdm) DelDestination ¶
func (*KafkaMdm) GetDestination ¶
func (route *KafkaMdm) GetDestination(index int) (*dest.Destination, error)
func (*KafkaMdm) UpdateDestination ¶
func (*KafkaMdm) UpdateMatcher ¶
type MetricsResponse ¶ added in v0.12.0
type MetricsResponse struct { Invalid int Published int ValidationErrors map[string]ValidationError }
type PubSub ¶ added in v0.11.0
type PubSub struct {
// contains filtered or unexported fields
}
PubSub publishes metrics to a Google PubSub topic
func (*PubSub) Add ¶ added in v0.11.0
func (route *PubSub) Add(dest *dest.Destination)
func (*PubSub) DelDestination ¶ added in v0.11.0
func (*PubSub) Dispatch ¶ added in v0.11.0
Dispatch is called to submit metrics. They will be in graphite 'plain' format no matter how they arrived.
func (*PubSub) GetDestination ¶ added in v0.11.0
func (route *PubSub) GetDestination(index int) (*dest.Destination, error)
func (*PubSub) Shutdown ¶ added in v0.11.0
Shutdown stops the pubsub publisher and returns with the publisher has finished in-flight work
func (*PubSub) UpdateDestination ¶ added in v0.11.0
func (*PubSub) UpdateMatcher ¶ added in v0.11.0
type Route ¶
type Route interface { Dispatch(buf []byte) Match(s []byte) bool Snapshot() Snapshot Key() string Flush() error Shutdown() error GetDestination(index int) (*dest.Destination, error) DelDestination(index int) error UpdateDestination(index int, opts map[string]string) error Update(opts map[string]string) error }
func NewCloudWatch ¶ added in v0.11.0
func NewCloudWatch(key, prefix, sub, regex, awsProfile, awsRegion, awsNamespace string, awsDimensions [][]string, bufSize, flushMaxSize, flushMaxWait int, storageResolution int64, blocking bool) (Route, error)
NewCloudWatch creates a route that writes metrics to the AWS service CloudWatch We will automatically run the route and the destination
func NewConsistentHashing ¶
func NewConsistentHashing(key, prefix, sub, regex string, destinations []*dest.Destination) (Route, error)
func NewGrafanaNet ¶
func NewGrafanaNet(key, prefix, sub, regex, addr, apiKey, schemasFile string, spool, sslVerify, blocking bool, bufSize, flushMaxNum, flushMaxWait, timeout, concurrency, orgId int) (Route, error)
NewGrafanaNet creates a special route that writes to a grafana.net datastore We will automatically run the route and the destination ignores spool for now
func NewKafkaMdm ¶
func NewKafkaMdm(key, prefix, sub, regex, topic, codec, schemasFile, partitionBy string, brokers []string, bufSize, orgId, flushMaxNum, flushMaxWait, timeout int, blocking bool) (Route, error)
NewKafkaMdm creates a special route that writes to a grafana.net datastore We will automatically run the route and the destination
func NewPubSub ¶ added in v0.11.0
func NewPubSub(key, prefix, sub, regex, project, topic, format, codec string, bufSize, flushMaxSize, flushMaxWait int, blocking bool) (Route, error)
NewPubSub creates a route that writes metrics to a Google PubSub topic We will automatically run the route and the destination
func NewSendAllMatch ¶
func NewSendAllMatch(key, prefix, sub, regex string, destinations []*dest.Destination) (Route, error)
NewSendAllMatch creates a sendAllMatch route. We will automatically run the route and the given destinations
func NewSendFirstMatch ¶
func NewSendFirstMatch(key, prefix, sub, regex string, destinations []*dest.Destination) (Route, error)
NewSendFirstMatch creates a sendFirstMatch route. We will automatically run the route and the given destinations
type SendAllMatch ¶
type SendAllMatch struct {
// contains filtered or unexported fields
}
func (*SendAllMatch) Add ¶
func (route *SendAllMatch) Add(dest *dest.Destination)
func (*SendAllMatch) DelDestination ¶
func (*SendAllMatch) Dispatch ¶
func (route *SendAllMatch) Dispatch(buf []byte)
func (*SendAllMatch) GetDestination ¶
func (route *SendAllMatch) GetDestination(index int) (*dest.Destination, error)
func (*SendAllMatch) Snapshot ¶
func (route *SendAllMatch) Snapshot() Snapshot
func (*SendAllMatch) UpdateDestination ¶
func (*SendAllMatch) UpdateMatcher ¶
type SendFirstMatch ¶
type SendFirstMatch struct {
// contains filtered or unexported fields
}
func (*SendFirstMatch) Add ¶
func (route *SendFirstMatch) Add(dest *dest.Destination)
func (*SendFirstMatch) DelDestination ¶
func (*SendFirstMatch) Dispatch ¶
func (route *SendFirstMatch) Dispatch(buf []byte)
func (*SendFirstMatch) GetDestination ¶
func (route *SendFirstMatch) GetDestination(index int) (*dest.Destination, error)
func (*SendFirstMatch) Snapshot ¶
func (route *SendFirstMatch) Snapshot() Snapshot