zipper

package
v0.0.0-...-d4fddea Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: BSD-2-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CarbonSearch

type CarbonSearch struct {
	Backend string `yaml:"backend"`
	Prefix  string `yaml:"prefix"`
}

CarbonSearch is a global structure that contains carbonsearch related configuration bits

type Config

type Config struct {
	ConcurrencyLimitPerServer int
	MaxIdleConnsPerHost       int
	Backends                  []string

	CarbonSearch CarbonSearch

	PathCache         pathcache.PathCache
	SearchCache       pathcache.PathCache
	Timeouts          Timeouts
	KeepAliveInterval time.Duration `yaml:"keepAliveInterval"`
}

Config is a structure that contains zipper-related configuration bits

type ServerResponse

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

ServerResponse contains response from the zipper

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
}

Stats provides zipper-related statistics

type Timeouts

type Timeouts struct {
	Global       time.Duration `yaml:"global"`
	AfterStarted time.Duration `yaml:"afterStarted"`
	Connect      time.Duration `yaml:"connect"`
}

Timeouts is a global structure that contains configuration for zipper Timeouts

type UpstreamResponse

type UpstreamResponse interface {
	HttpStatus() int
	Body() []byte
	Upstream() string
}

type Zipper

type Zipper struct {
	ProbeQuit  chan struct{}
	ProbeForce chan int
	// contains filtered or unexported fields
}

Zipper provides interface to Zipper-related functions

func NewZipper

func NewZipper(sender func(*Stats), config *Config, logger *zap.Logger) *Zipper

NewZipper allows to create new Zipper

func (*Zipper) Find

func (z *Zipper) Find(ctx context.Context, logger *zap.Logger, query string) ([]pb3.GlobMatch, *Stats, error)

func (*Zipper) Info

func (z *Zipper) Info(ctx context.Context, logger *zap.Logger, target string) (map[string]pb3.InfoResponse, *Stats, error)

func (*Zipper) Render

func (z *Zipper) Render(ctx context.Context, logger *zap.Logger, target string, from, until int32) (*pb3.MultiFetchResponse, *Stats, error)

Jump to

Keyboard shortcuts

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