server

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIngestHandler added in v0.3.0

func NewIngestHandler(log *logrus.Logger, st *storage.Storage, exporter storage.MetricsExporter, onSuccess func(pi *storage.PutInput)) http.Handler

func WriteError added in v0.3.0

func WriteError(log *logrus.Logger, w http.ResponseWriter, code int, err error, msg string)

func WriteErrorMessage added in v0.3.0

func WriteErrorMessage(log *logrus.Logger, w http.ResponseWriter, code int, msg string)

Types

type Config added in v0.2.1

type Config struct {
	Configuration *config.Server
	*logrus.Logger
	*storage.Storage
	*gorm.DB
	Notifier

	// The registerer is used for exposing server metrics.
	MetricsRegisterer prometheus.Registerer

	// Exported metrics registry and exported.
	ExportedMetricsRegistry *prometheus.Registry
	storage.MetricsExporter

	Adhoc adhocserver.Server

	ScrapeManager *scrape.Manager
}

type Controller

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

func New

func New(c Config) (*Controller, error)

func (*Controller) AppsCount added in v0.0.13

func (ctrl *Controller) AppsCount() int

func (*Controller) Drain added in v0.0.34

func (ctrl *Controller) Drain()

func (*Controller) Start

func (ctrl *Controller) Start() error

func (*Controller) Stats added in v0.0.13

func (ctrl *Controller) Stats() map[string]int

func (*Controller) Stop added in v0.0.30

func (ctrl *Controller) Stop() error

type Notifier added in v0.2.2

type Notifier interface {
	// NotificationText returns message that will be displayed to user
	// on index page load. The message should point user to a critical problem.
	// TODO(kolesnikovae): we should poll for notifications (or subscribe).
	NotificationText() string
}

type Payload added in v0.9.0

type Payload struct {
	Name    string
	Profile string
	Type    string
}

type RenderDiffParams added in v0.0.38

type RenderDiffParams struct {
	Name  *string `json:"name,omitempty"`
	Query *string `json:"query,omitempty"`

	From  string `json:"from"`
	Until string `json:"until"`

	Format   string `json:"format"`
	MaxNodes *int   `json:"maxNodes,omitempty"`

	Left  RenderTreeParams `json:"leftParams"`
	Right RenderTreeParams `json:"rightParams"`
}

type RenderResponse added in v0.7.0

type RenderResponse struct {
	flamebearer.FlamebearerProfile
	Metadata renderMetadataResponse `json:"metadata"`
}

type RenderTreeParams added in v0.0.38

type RenderTreeParams struct {
	From  string `json:"from"`
	Until string `json:"until"`
}

type TargetsResponse added in v0.11.0

type TargetsResponse struct {
	Job                string              `json:"job"`
	TargetURL          string              `json:"url"`
	DiscoveredLabels   labels.Labels       `json:"discoveredLabels"`
	Labels             labels.Labels       `json:"labels"`
	Health             scrape.TargetHealth `json:"health"`
	LastScrape         time.Time           `json:"lastScrape"`
	LastError          string              `json:"lastError"`
	LastScrapeDuration string              `json:"lastScrapeDuration"`
}

Jump to

Keyboard shortcuts

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