Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateIndex(indexName string) error
- func (c *Client) DeleteIndex(indexName string) error
- func (c *Client) GetIndex(indexName string) (IndexSettingsRepresentation, error)
- func (c *Client) Health() (HealthRepresentation, error)
- func (c *Client) ListIndexes() ([]IndexRepresentation, error)
- type Config
- type FlakiLightClient
- type GoKitMetrics
- type HealthRepresentation
- type IndexRepresentation
- type IndexSettingsRepresentation
- type Influx
- type InfluxMetrics
- func (m *InfluxMetrics) NewCounter(name string) metrics.Counter
- func (m *InfluxMetrics) NewGauge(name string) metrics.Gauge
- func (m *InfluxMetrics) NewHistogram(name string) metrics.Histogram
- func (m *InfluxMetrics) Ping(timeout time.Duration) (time.Duration, string, error)
- func (m *InfluxMetrics) WriteLoop(c <-chan time.Time)
- type NoopCounter
- type NoopGauge
- type NoopHistogram
- type NoopMetrics
- func (m *NoopMetrics) NewCounter(name string) metrics.Counter
- func (m *NoopMetrics) NewGauge(name string) metrics.Gauge
- func (m *NoopMetrics) NewHistogram(name string) metrics.Histogram
- func (m *NoopMetrics) Ping(timeout time.Duration) (time.Duration, string, error)
- func (m *NoopMetrics) WriteLoop(c <-chan time.Time)
- type NoopRedis
- type NoopSentry
- type Redis
- type RedisWriter
- type Sentry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateIndex ¶
func (*Client) DeleteIndex ¶
func (*Client) GetIndex ¶
func (c *Client) GetIndex(indexName string) (IndexSettingsRepresentation, error)
func (*Client) Health ¶
func (c *Client) Health() (HealthRepresentation, error)
func (*Client) ListIndexes ¶
func (c *Client) ListIndexes() ([]IndexRepresentation, error)
type FlakiLightClient ¶
type FlakiLightClient struct {
// contains filtered or unexported fields
}
func NewFlakiLightClient ¶
func NewFlakiLightClient(client fb_flaki.FlakiClient) *FlakiLightClient
func (*FlakiLightClient) NextValidID ¶
func (f *FlakiLightClient) NextValidID() (string, error)
type GoKitMetrics ¶
type GoKitMetrics interface {
NewCounter(name string) *metric.Counter
NewGauge(name string) *metric.Gauge
NewHistogram(name string) *metric.Histogram
WriteLoop(c <-chan time.Time, w metric.BatchPointsWriter)
}
GoKitMetrics is the interface of the go-kit metrics.
type HealthRepresentation ¶
type HealthRepresentation struct {
ClusterName string `json:"cluster_name"`
Status string `json:"status"`
TimedOut bool `json:"timed_out"`
NumberOfNodes int `json:"number_of_nodes"`
NumberOfDataNodes int `json:"number_of_data_nodes"`
ActivedPrimaryShards int `json:"active_primary_shards"`
ActiveShards int `json:"active_shards"`
RelocatingShards int `json:"relocating_shards"`
InitializingShards int `json:"initializing_shards"`
UnassignedShards int `json:"unassigned_shards"`
DelayedUnassignedShards int `json:"delayed_unassigned_shards"`
NumberOfPendingTasks int `json:"number_of_pending_tasks"`
NumberOfInFlightFetch int `json:"number_of_in_flight_fetch"`
TaskMaxWaitingInQueueMillis int `json:"task_max_waiting_in_queue_millis"`
ActiveShardsPercentAsNumber float64 `json:"active_shards_percent_as_number"`
}
type IndexRepresentation ¶
type Influx ¶
type Influx interface {
Ping(timeout time.Duration) (time.Duration, string, error)
Write(bp influx.BatchPoints) error
Close() error
}
Influx is the Influx client interface.
type InfluxMetrics ¶
type InfluxMetrics struct {
// contains filtered or unexported fields
}
InfluxMetrics sends metrics to the Influx DB.
func NewMetrics ¶
func NewMetrics(influx Influx, metrics GoKitMetrics) *InfluxMetrics
NewMetrics returns an InfluxMetrics.
func (*InfluxMetrics) NewCounter ¶
func (m *InfluxMetrics) NewCounter(name string) metrics.Counter
NewCounter returns a go-kit Counter.
func (*InfluxMetrics) NewGauge ¶
func (m *InfluxMetrics) NewGauge(name string) metrics.Gauge
NewGauge returns a go-kit Gauge.
func (*InfluxMetrics) NewHistogram ¶
func (m *InfluxMetrics) NewHistogram(name string) metrics.Histogram
NewHistogram returns a go-kit Histogram.
func (*InfluxMetrics) WriteLoop ¶
func (m *InfluxMetrics) WriteLoop(c <-chan time.Time)
WriteLoop writes the data to the Influx DB.
type NoopHistogram ¶
type NoopHistogram struct{}
NoopHistogram is an Histogram that does nothing.
func (*NoopHistogram) Observe ¶
func (h *NoopHistogram) Observe(value float64)
Observe does nothing.
type NoopMetrics ¶
type NoopMetrics struct{}
NoopMetrics is an Influx metrics that does nothing.
func (*NoopMetrics) NewCounter ¶
func (m *NoopMetrics) NewCounter(name string) metrics.Counter
NewCounter returns a Counter that does nothing.
func (*NoopMetrics) NewGauge ¶
func (m *NoopMetrics) NewGauge(name string) metrics.Gauge
NewGauge returns a Gauge that does nothing.
func (*NoopMetrics) NewHistogram ¶
func (m *NoopMetrics) NewHistogram(name string) metrics.Histogram
NewHistogram returns an Histogram that does nothing.
func (*NoopMetrics) WriteLoop ¶
func (m *NoopMetrics) WriteLoop(c <-chan time.Time)
WriteLoop does nothing.
type NoopRedis ¶
type NoopRedis struct{}
NoopRedis is a Redis client that does nothing.
type NoopSentry ¶
type NoopSentry struct{}
NoopSentry is a Sentry client that does nothing.
func (*NoopSentry) CaptureError ¶
func (s *NoopSentry) CaptureError(err error, tags map[string]string, interfaces ...sentry.Interface) string
CaptureError does nothing.
type RedisWriter ¶
type RedisWriter struct {
// contains filtered or unexported fields
}
RedisWriter encodes logs in logstash format and writes them to Redis.
func NewLogstashRedisWriter ¶
func NewLogstashRedisWriter(redis Redis, key string) *RedisWriter
NewLogstashRedisWriter returns a writer that writes logs into a redis DB.