types

package
v0.0.0-...-b9a9d18 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2019 License: BSD-2-Clause Imports: 12 Imported by: 0

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
const (
	RoundRobinLB LBMethod = iota
	BroadcastLB
)

func (*LBMethod) FromString

func (m *LBMethod) FromString(method string) error

func (LBMethod) MarshalJSON

func (m LBMethod) MarshalJSON() ([]byte, error)

func (*LBMethod) UnmarshalJSON

func (m *LBMethod) UnmarshalJSON(data []byte) error

func (*LBMethod) UnmarshalYAML

func (m *LBMethod) UnmarshalYAML(unmarshal func(interface{}) error) error

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 ServerInfoResponse struct {
	Server   string
	Response *protov3.ZipperInfoResponse
	Stats    *Stats
	Err      *errors.Errors
}

type ServerResponse

type ServerResponse struct {
	Server   string
	Response []byte
}

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

func (*Stats) Merge

func (s *Stats) Merge(stats *Stats)

type Timeouts

type Timeouts struct {
	Find    time.Duration `yaml:"find"`
	Render  time.Duration `yaml:"render"`
	Connect time.Duration `yaml:"connect"`
}

Timeouts is a global structure that contains configuration for zipper Timeouts

Jump to

Keyboard shortcuts

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