carbonserver

package
v0.14.1-0...-915d78e Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: MIT, Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryIsPending uint64 = 1 << iota
	DataIsAvailable
)

Variables

View Source
var TraceHeaders = map[string]string{
	"X-CTX-CarbonAPI-UUID":    "carbonapi_uuid",
	"X-CTX-CarbonZipper-UUID": "carbonzipper_uuid",
	"X-Request-ID":            "request_id",
}

Functions

func TraceContextToZap

func TraceContextToZap(ctx context.Context, logger *zap.Logger) *zap.Logger

func TraceHandler

func TraceHandler(h http.HandlerFunc, globalStatusCodes []uint64, handlerStatusCodes []uint64, promRequest func(string, int)) http.HandlerFunc

Types

type CarbonserverListener

type CarbonserverListener struct {
	helper.Stoppable
	// contains filtered or unexported fields
}

func NewCarbonserverListener

func NewCarbonserverListener(cacheGetFunc func(key string) []points.Point) *CarbonserverListener

func (*CarbonserverListener) CurrentFileIndex

func (listener *CarbonserverListener) CurrentFileIndex() *fileIndex

func (*CarbonserverListener) InitPrometheus

func (c *CarbonserverListener) InitPrometheus(reg prom.Registerer)

func (*CarbonserverListener) Listen

func (listener *CarbonserverListener) Listen(listen string) error

func (*CarbonserverListener) SetBuckets

func (listener *CarbonserverListener) SetBuckets(buckets int)

func (*CarbonserverListener) SetCompressed

func (listener *CarbonserverListener) SetCompressed(compressed bool)

func (*CarbonserverListener) SetFLock

func (listener *CarbonserverListener) SetFLock(flock bool)

func (*CarbonserverListener) SetFailOnMaxGlobs

func (listener *CarbonserverListener) SetFailOnMaxGlobs(failOnMaxGlobs bool)

func (*CarbonserverListener) SetFindCacheEnabled

func (listener *CarbonserverListener) SetFindCacheEnabled(enabled bool)

func (*CarbonserverListener) SetIdleTimeout

func (listener *CarbonserverListener) SetIdleTimeout(idleTimeout time.Duration)

func (*CarbonserverListener) SetInternalStatsDir

func (listener *CarbonserverListener) SetInternalStatsDir(dbPath string)

func (*CarbonserverListener) SetMaxGlobs

func (listener *CarbonserverListener) SetMaxGlobs(maxGlobs int)

func (*CarbonserverListener) SetMaxMetricsGlobbed

func (listener *CarbonserverListener) SetMaxMetricsGlobbed(max int)

func (*CarbonserverListener) SetMaxMetricsRendered

func (listener *CarbonserverListener) SetMaxMetricsRendered(max int)

func (*CarbonserverListener) SetMetricsAsCounters

func (listener *CarbonserverListener) SetMetricsAsCounters(metricsAsCounters bool)

func (*CarbonserverListener) SetPercentiles

func (listener *CarbonserverListener) SetPercentiles(percentiles []int)

func (*CarbonserverListener) SetQueryCacheEnabled

func (listener *CarbonserverListener) SetQueryCacheEnabled(enabled bool)

func (*CarbonserverListener) SetQueryCacheSizeMB

func (listener *CarbonserverListener) SetQueryCacheSizeMB(size int)

func (*CarbonserverListener) SetReadTimeout

func (listener *CarbonserverListener) SetReadTimeout(readTimeout time.Duration)

func (*CarbonserverListener) SetRemoveEmptyFile

func (listener *CarbonserverListener) SetRemoveEmptyFile(remove bool)

func (*CarbonserverListener) SetScanFrequency

func (listener *CarbonserverListener) SetScanFrequency(scanFrequency time.Duration)

func (*CarbonserverListener) SetTrieIndex

func (listener *CarbonserverListener) SetTrieIndex(enabled bool)

func (*CarbonserverListener) SetTrigramIndex

func (listener *CarbonserverListener) SetTrigramIndex(enabled bool)

func (*CarbonserverListener) SetWhisperData

func (listener *CarbonserverListener) SetWhisperData(whisperData string)

func (*CarbonserverListener) SetWriteTimeout

func (listener *CarbonserverListener) SetWriteTimeout(writeTimeout time.Duration)

func (*CarbonserverListener) Stat

func (listener *CarbonserverListener) Stat(send helper.StatCallback)

func (*CarbonserverListener) Stop

func (listener *CarbonserverListener) Stop() error

func (*CarbonserverListener) UpdateFileIndex

func (listener *CarbonserverListener) UpdateFileIndex(fidx *fileIndex)

func (*CarbonserverListener) UpdateMetricsAccessTimes

func (listener *CarbonserverListener) UpdateMetricsAccessTimes(metrics map[string]int64, initial bool)

func (*CarbonserverListener) UpdateMetricsAccessTimesByRequest

func (listener *CarbonserverListener) UpdateMetricsAccessTimesByRequest(metrics []string)

type ExpandedGlobResponse

type ExpandedGlobResponse struct {
	Name  string
	Files []string
	Leafs []bool
	Err   error
}

type GlobResponse struct {

type IntervalSet

type IntervalSet struct {
	Start int32
	End   int32
}

Fake single interval set for graphite

func (*IntervalSet) MarshalPickle

func (i *IntervalSet) MarshalPickle() ([]byte, error)

type Metadata

type Metadata struct {
	ConsolidationFunc string
	XFilesFactor      float32
}

type QueryItem

type QueryItem struct {
	Data          atomic.Value
	Flags         uint64 // DataIsAvailable or QueryIsPending
	QueryFinished chan struct{}
}

func (*QueryItem) FetchOrLock

func (q *QueryItem) FetchOrLock() (interface{}, bool)

func (*QueryItem) StoreAbort

func (q *QueryItem) StoreAbort()

func (*QueryItem) StoreAndUnlock

func (q *QueryItem) StoreAndUnlock(data interface{})

Jump to

Keyboard shortcuts

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