util

package
v0.0.0-...-98f13d6 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTracer

func GetTracer(app string, enabled bool, addr string) (opentracing.Tracer, io.Closer, error)

func InitLogger

func InitLogger()

func JoinUrlFragments

func JoinUrlFragments(a, b string) string

func NewMetricsServer

func NewMetricsServer(addr string) *metricsServer

NewMetricsServer starts an http server which acts as a Prometheus scrape and pprof debug endpoint.

func RegisterFlags

func RegisterFlags(rs ...Registerer)

RegisterFlags registers flags with the provided Registerers

Types

type BufferPool

type BufferPool struct {
	// contains filtered or unexported fields
}

BufferPool is used to buffer proxied query requests and kakfka messages

func NewBufferPool

func NewBufferPool() *BufferPool

func (*BufferPool) Get

func (b *BufferPool) Get() []byte

func (*BufferPool) Put

func (b *BufferPool) Put(buf []byte)

type BufferPool33

type BufferPool33 struct {
	// contains filtered or unexported fields
}

BufferPool33 is a pool that returns cap=33 len=0 byte slices

func NewBufferPool33

func NewBufferPool33() *BufferPool33

func (*BufferPool33) Get

func (b *BufferPool33) Get() []byte

func (*BufferPool33) Put

func (b *BufferPool33) Put(buf []byte)

type Int64SliceFlag

type Int64SliceFlag []int64

func (*Int64SliceFlag) Set

func (i *Int64SliceFlag) Set(value string) error

func (*Int64SliceFlag) String

func (i *Int64SliceFlag) String() string

type MetricDataPool

type MetricDataPool struct {
	// contains filtered or unexported fields
}

func NewMetricDataPool

func NewMetricDataPool() *MetricDataPool

func (*MetricDataPool) Get

func (b *MetricDataPool) Get() *schema.MetricData

func (*MetricDataPool) Put

func (b *MetricDataPool) Put(m *schema.MetricData)

type Registerer

type Registerer interface {
	RegisterFlags(*flag.FlagSet)
}

Registerer is a thing that can RegisterFlags

Jump to

Keyboard shortcuts

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