Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyMsg = &empty.Empty{}
View Source
var ErrFailedToFetchFmt = "failed to fetch data from server group %v, code %v, body %v"
View Source
var ErrMaxTriesExceeded = errors.New("max tries exceeded")
View Source
var ErrNoMetricsFetched = errors.New("no metrics in the Response")
View Source
var ErrNoResponseFetched = errors.New("no responses fetched from upstream")
View Source
var ErrNonFatalErrors = errors.New("response contains non-fatal errors")
View Source
var ErrNotFound = errors.New("metric not found")
View Source
var ErrNotImplementedYet = errors.New("this feature is not implemented yet")
View Source
var ErrResponseLengthMismatch = errors.New("response length mismatch")
View Source
var ErrResponseStartTimeMismatch = errors.New("response start time mismatch")
View Source
var ErrTimeoutExceeded = errors.New("timeout while fetching Response")
View Source
var ErrUnknownLBMethodFmt = "unknown lb method: '%v', supported: %v"
Functions ¶
func MergeFetchResponses ¶
func MergeFetchResponses(m1, m2 *protov3.FetchResponse) *errors.Errors
Types ¶
type BackendV2 ¶
type BackendV2 struct { GroupName string `mapstructure:"groupName"` Protocol string `mapstructure:"protocol"` LBMethod string `mapstructure:"lbMethod"` // Valid: rr/roundrobin, broadcast/all Servers []string `mapstructure:"servers"` Timeouts *Timeouts `mapstructure:"timeouts"` ConcurrencyLimit *int `mapstructure:"concurrencyLimit"` KeepAliveInterval *time.Duration `mapstructure:"keepAliveInterval"` MaxIdleConnsPerHost *int `mapstructure:"maxIdleConnsPerHost"` MaxTries *int `mapstructure:"maxTries"` MaxGlobs int `mapstructure:"maxGlobs"` }
func (*BackendV2) FillDefaults ¶
func (b *BackendV2) FillDefaults()
type BackendsV2 ¶
type BackendsV2 struct { Backends []BackendV2 `mapstructure:"backends"` MaxIdleConnsPerHost int `mapstructure:"maxIdleConnsPerHost"` ConcurrencyLimitPerServer int `mapstructure:"concurrencyLimit"` Timeouts Timeouts `mapstructure:"timeouts"` KeepAliveInterval time.Duration `mapstructure:"keepAliveInterval"` MaxTries int `mapstructure:"maxTries"` MaxGlobs int `mapstructure:"maxGlobs"` }
type CarbonSearch ¶
type CarbonSearch struct { Backend string `mapstructure:"backend"` Prefix string `mapstructure:"prefix"` }
CarbonSearch is a structure that contains carbonsearch related configuration bits
type CarbonSearchV2 ¶
type CarbonSearchV2 struct { BackendsV2 Prefix string `mapstructure:"prefix"` }
type LBMethod ¶
type LBMethod int
func (*LBMethod) FromString ¶
func (LBMethod) MarshalJSON ¶
func (*LBMethod) UnmarshalJSON ¶
func (*LBMethod) UnmarshalYAML ¶
type ServerClient ¶
type ServerClient interface { Name() string Backends() []string MaxMetricsPerRequest() int Fetch(ctx context.Context, request *protov3.MultiFetchRequest) (*protov3.MultiFetchResponse, *Stats, *errors.Errors) Find(ctx context.Context, request *protov3.MultiGlobRequest) (*protov3.MultiGlobResponse, *Stats, *errors.Errors) Info(ctx context.Context, request *protov3.MultiMetricsInfoRequest) (*protov3.ZipperInfoResponse, *Stats, *errors.Errors) List(ctx context.Context) (*protov3.ListMetricsResponse, *Stats, *errors.Errors) Stats(ctx context.Context) (*protov3.MetricDetailsResponse, *Stats, *errors.Errors) ProbeTLDs(ctx context.Context) ([]string, *errors.Errors) }
type ServerFetchResponse ¶
type ServerFetchResponse struct { Server string ResponsesMap map[string][]protov3.FetchResponse Response *protov3.MultiFetchResponse Stats *Stats Err *errors.Errors }
func (*ServerFetchResponse) Merge ¶
func (first *ServerFetchResponse) Merge(second *ServerFetchResponse)
type ServerFindResponse ¶
type ServerFindResponse struct { Server string Response *protov3.MultiGlobResponse Stats *Stats Err *errors.Errors }
func (*ServerFindResponse) Merge ¶
func (first *ServerFindResponse) Merge(second *ServerFindResponse) *errors.Errors
type ServerInfoResponse ¶
type ServerResponse ¶
type Stats ¶
type Stats struct { Timeouts int64 FindErrors int64 RenderErrors int64 InfoErrors int64 SearchRequests int64 SearchCacheHits int64 SearchCacheMisses int64 MemoryUsage int64 CacheMisses int64 CacheHits int64 Servers []string FailedServers []string }
Stats provides zipper-related statistics
Click to show internal directories.
Click to hide internal directories.