server

package
v0.18.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExportHandler added in v0.14.0

func NewExportHandler(httpUtils httputils.Utils) http.HandlerFunc

func NewIndexHandler added in v0.14.0

func NewIndexHandler(
	log *logrus.Logger,
	s storage.AppNameGetter,
	dir http.FileSystem,
	stats StatsReceiver,
	notifier Notifier,
	cfg *IndexHandlerConfig,
	httpUtils httputils.Utils,
) http.Handler

func NewIngestHandler added in v0.3.0

func NewIngestHandler(log *logrus.Logger, p Parser, onSuccess func(pi *parser.PutInput), httpUtils httputils.Utils) http.Handler

func NewLabelValuesHandler added in v0.14.0

func NewLabelValuesHandler(s storage.LabelValuesGetter, httpUtils httputils.Utils) http.HandlerFunc

func NewLabelsHandler added in v0.14.0

func NewLabelsHandler(s storage.LabelsGetter, httpUtils httputils.Utils) http.HandlerFunc

Types

type Config added in v0.2.1

type Config struct {
	Configuration *config.Server
	*logrus.Logger
	// TODO: Ideally, Storage should be decomposed.
	*storage.Storage
	storage.Putter
	*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) StatsInc added in v0.14.0

func (ctrl *Controller) StatsInc(name string)

func (*Controller) Stop added in v0.0.30

func (ctrl *Controller) Stop() error

type Flags added in v0.14.0

type Flags struct {
	EnableAdhocUI       bool `json:"enableAdhocUI"`
	GoogleEnabled       bool `json:"googleEnabled"`
	GitlabEnabled       bool `json:"gitlabEnabled"`
	GithubEnabled       bool `json:"githubEnabled"`
	InternalAuthEnabled bool `json:"internalAuthEnabled"`
	SignupEnabled       bool `json:"signupEnabled"`
}

type IndexHandler added in v0.14.0

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

func (*IndexHandler) ServeHTTP added in v0.14.0

func (ih *IndexHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type IndexHandlerConfig added in v0.14.0

type IndexHandlerConfig struct {
	Flags          Flags
	IsAuthRequired bool
	BaseURL        string
}

type MergeHandler added in v0.14.0

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

func NewMergeHandler added in v0.14.0

func NewMergeHandler(l *logrus.Logger, s storage.Merger, dir http.FileSystem, stats StatsReceiver, maxNodesDefault int, httpUtils httputils.Utils) *MergeHandler

func (*MergeHandler) ServeHTTP added in v0.14.0

func (mh *MergeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

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 Parser added in v0.14.0

type Parser interface {
	Put(context.Context, *parser.PutInput) error
}

type Payload added in v0.9.0

type Payload struct {
	Name    string
	Profile string
	Type    string
}

type RenderDiffHandler added in v0.14.0

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

func NewRenderDiffHandler added in v0.14.0

func NewRenderDiffHandler(l *logrus.Logger, s storage.Getter, dir http.FileSystem, stats StatsReceiver, maxNodesDefault int, httpUtils httputils.Utils) *RenderDiffHandler

func (*RenderDiffHandler) ServeHTTP added in v0.14.0

func (rh *RenderDiffHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type RenderDiffParams added in v0.0.38

type RenderDiffParams struct {
	LeftQuery string `json:"leftQuery"`
	LeftFrom  string `json:"leftFrom"`
	LeftUntil string `json:"leftUntil"`

	RightQuery string `json:"rightQuery"`
	RightFrom  string `json:"rightFrom"`
	RightUntil string `json:"rightUntil"`

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

RenderDiffParams refers to the params accepted by the renderDiffHandler

type RenderDiffResponse added in v0.14.0

type RenderDiffResponse struct {
	*flamebearer.FlamebearerProfile
}

RenderDiffResponse refers to the response of the renderDiffHandler

type RenderHandler added in v0.14.0

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

func NewRenderHandler added in v0.14.0

func NewRenderHandler(l *logrus.Logger, s storage.Getter, dir http.FileSystem, stats StatsReceiver, maxNodesDefault int, httpUtils httputils.Utils) *RenderHandler

func (*RenderHandler) ServeHTTP added in v0.14.0

func (rh *RenderHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

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 StatsReceiver added in v0.14.0

type StatsReceiver interface {
	StatsInc(name string)
}

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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