Documentation ¶
Index ¶
- type InfluxClient
- type InfluxCounter
- type InfluxHistogram
- type InfluxMetrics
- type Middleware
- func MakeServiceErrorMiddleware(log log.Logger, client sentryClient) Middleware
- func MakeServiceInstrumentingMiddleware(influxCounter InfluxCounter, influxHistogram InfluxHistogram) Middleware
- func MakeServiceLoggingMiddleware(log log.Logger) Middleware
- func MakeServiceTracingMiddleware(tracer stdopentracing.Tracer) Middleware
- type ServiceVault
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InfluxClient ¶
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 ¶
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