elasticsearch_bridge

package
v0.0.0-...-afd77eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2018 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

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 New

func New(config Config) (*Client, error)

func (*Client) CreateIndex

func (c *Client) CreateIndex(indexName string) error

func (*Client) DeleteIndex

func (c *Client) DeleteIndex(indexName string) error

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 Config

type Config struct {
	Addr    string
	Timeout time.Duration
}

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 IndexRepresentation struct {
	Index  string `json:"index"`
	Status string `json:"status"`
}

type IndexSettingsRepresentation

type IndexSettingsRepresentation struct {
	CreationDate     time.Time `json:"creation_date"`
	NumberOfShards   int       `json:"number_of_shards"`
	NumberOfReplicas int       `json:"number_of_replicas"`
	UUID             string    `json:"uuid"`
}

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) Ping

func (m *InfluxMetrics) Ping(timeout time.Duration) (time.Duration, string, error)

Ping test the connection to the Influx DB.

func (*InfluxMetrics) WriteLoop

func (m *InfluxMetrics) WriteLoop(c <-chan time.Time)

WriteLoop writes the data to the Influx DB.

type NoopCounter

type NoopCounter struct{}

NoopCounter is a Counter that does nothing.

func (*NoopCounter) Add

func (c *NoopCounter) Add(delta float64)

Add does nothing.

func (*NoopCounter) With

func (c *NoopCounter) With(labelValues ...string) metrics.Counter

With does nothing.

type NoopGauge

type NoopGauge struct{}

NoopGauge is a Gauge that does nothing.

func (*NoopGauge) Add

func (g *NoopGauge) Add(delta float64)

Add does nothing.

func (*NoopGauge) Set

func (g *NoopGauge) Set(value float64)

Set does nothing.

func (*NoopGauge) With

func (g *NoopGauge) With(labelValues ...string) metrics.Gauge

With does nothing.

type NoopHistogram

type NoopHistogram struct{}

NoopHistogram is an Histogram that does nothing.

func (*NoopHistogram) Observe

func (h *NoopHistogram) Observe(value float64)

Observe does nothing.

func (*NoopHistogram) With

func (h *NoopHistogram) With(labelValues ...string) metrics.Histogram

With 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) Ping

func (m *NoopMetrics) Ping(timeout time.Duration) (time.Duration, string, error)

Ping 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.

func (*NoopRedis) Close

func (r *NoopRedis) Close() error

Close does nothing.

func (*NoopRedis) Do

func (r *NoopRedis) Do(commandName string, args ...interface{}) (reply interface{}, err error)

Do does nothing.

func (*NoopRedis) Flush

func (r *NoopRedis) Flush() error

Flush does nothing.

func (*NoopRedis) Send

func (r *NoopRedis) Send(commandName string, args ...interface{}) error

Send 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.

func (*NoopSentry) Close

func (s *NoopSentry) Close()

Close does nothing.

func (*NoopSentry) URL

func (s *NoopSentry) URL() string

URL does nothing.

type Redis

type Redis interface {
	Send(commandName string, args ...interface{}) error
}

Redis is the redis client interface.

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.

func (*RedisWriter) Write

func (w *RedisWriter) Write(data []byte) (int, error)

Write encodes logs in logstash format and writes them to Redis.

type Sentry

type Sentry interface {
	URL() string
}

Sentry is the Sentry client interface.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL