components

package
v0.0.0-...-29ced6d Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: AGPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfluxClient

type InfluxClient struct {
	C *influx.Influx
}

InfluxClient struct

func (*InfluxClient) NewCounter

func (ic *InfluxClient) NewCounter(name string) InfluxCounter

NewCounter instantiates an InfluxCounter for an InfluxClient

func (*InfluxClient) NewHistogram

func (ic *InfluxClient) NewHistogram(name string) InfluxHistogram

NewHistogram instantiates an InfluxHistogram for an InfluxClient

type InfluxCounter

type InfluxCounter interface {
	With(labelValues ...string) metrics.Counter
	Add(delta float64)
}

InfluxCounter is the interface that implements the same functions as metrics.Counter

type InfluxHistogram

type InfluxHistogram interface {
	With(labelValues ...string) metrics.Histogram
	Observe(value float64)
}

InfluxHistogram is the interface that implements the same functions as metrics.Histogram

type InfluxMetrics

type InfluxMetrics interface {
	NewCounter(name string) InfluxCounter
	NewHistogram(name string) InfluxHistogram
}

InfluxMetrics uses a counter and a histogram

type Middleware

type Middleware func(ServiceVault) ServiceVault

Middleware type

func MakeServiceErrorMiddleware

func MakeServiceErrorMiddleware(log log.Logger, client sentryClient) Middleware

MakeServiceErrorMiddleware wraps ServiceVault with Sentry

func MakeServiceInstrumentingMiddleware

func MakeServiceInstrumentingMiddleware(influxCounter InfluxCounter, influxHistogram InfluxHistogram) Middleware

MakeServiceInstrumentingMiddleware wraps ServiceVault with instrumenting tools

func MakeServiceLoggingMiddleware

func MakeServiceLoggingMiddleware(log log.Logger) Middleware

MakeServiceLoggingMiddleware wraps ServiceVault with logging tools

func MakeServiceTracingMiddleware

func MakeServiceTracingMiddleware(tracer stdopentracing.Tracer) Middleware

MakeServiceTracingMiddleware wraps ServiceVault with a tracer

type ServiceVault

type ServiceVault interface {
	WriteKey(ctx context.Context, pathKey string, keyValue string) error
	ReadKey(ctx context.Context, pathKey string) (string, error)
	CreateKey(ctx context.Context, keyName string, params map[string]interface{}) error
	ExportKey(ctx context.Context, keyPath string) (map[string]interface{}, error)
	Encrypt(ctx context.Context, keyName string, params map[string]interface{}) (string, error)
	Decrypt(ctx context.Context, keyName string, params map[string]interface{}) (string, error)
}

ServiceVault interface

func NewBasicService

func NewBasicService(module module.ServiceVault) ServiceVault

NewBasicService instatiates ServiceVault

Jump to

Keyboard shortcuts

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