flakid

package
v0.0.0-...-d5eddb0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2018 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 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 NoopCockroach

type NoopCockroach struct{}

NoopCockroach is a cockroach client that does nothing.

func (NoopCockroach) Exec

func (NoopCockroach) Exec(query string, args ...interface{}) (sql.Result, error)

Exec does nothing.

func (NoopCockroach) Query

func (NoopCockroach) Query(query string, args ...interface{}) (*sql.Rows, error)

Query does nothing.

func (NoopCockroach) QueryRow

func (NoopCockroach) QueryRow(query string, args ...interface{}) *sql.Row

QueryRow does nothing.

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 NoopResult

type NoopResult struct{}

NoopResult is a sql.Result that does nothing.

func (NoopResult) LastInsertId

func (NoopResult) LastInsertId() (int64, error)

LastInsertId does nothing.

func (NoopResult) RowsAffected

func (NoopResult) RowsAffected() (int64, error)

RowsAffected 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