Documentation ¶
Index ¶
- type Config
- type Persister
- func (p *Persister) IndexHandler(w http.ResponseWriter, r *http.Request)
- func (p *Persister) Persist(rowKey string, metrics []*schema.MetricData) error
- func (p *Persister) PersistHandler(w http.ResponseWriter, r *http.Request)
- func (p *Persister) Push(quit chan struct{})
- func (p *Persister) RemoveRowsHandler(w http.ResponseWriter, r *http.Request)
- func (p *Persister) Send() error
- type RemoveRowsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MetricsClientConfig metrics_client.Config StorageClientConfig storage.Config // contains filtered or unexported fields }
Config contains the configuration require to create a Persister
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to config this to the given FlagSet
type Persister ¶
Persister ingests payloads that are serialized into metrics and repeatedly sent to a metrics endpoint in the schema.MetricData format
func (*Persister) IndexHandler ¶
func (p *Persister) IndexHandler(w http.ResponseWriter, r *http.Request)
IndexHandler serves up the metrics currently being persisted
func (*Persister) Persist ¶
func (p *Persister) Persist(rowKey string, metrics []*schema.MetricData) error
Persist add metrics to memory map for persisting
func (*Persister) PersistHandler ¶
func (p *Persister) PersistHandler(w http.ResponseWriter, r *http.Request)
PersistHandler handles requests with payloads meant to be persisted
func (*Persister) Push ¶
func (p *Persister) Push(quit chan struct{})
Push schedules sending metrics to the gateway
func (*Persister) RemoveRowsHandler ¶
func (p *Persister) RemoveRowsHandler(w http.ResponseWriter, r *http.Request)
RemoveRowsHandler handles requests to remove payloads from the persister
type RemoveRowsRequest ¶
type RemoveRowsRequest struct {
RowKeys []string `json:"rowkeys"`
}
RemoveRowsRequest contains the information required to remove metrics from the persister