v1

package
v0.17.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlocksAPI

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

BlocksAPI is a very simple API used by Thanos Block Viewer.

func NewBlocksAPI

func NewBlocksAPI(logger log.Logger, label string, flagsMap map[string]string) *BlocksAPI

NewBlocksAPI creates a simple API to be used by Thanos Block Viewer.

func (*BlocksAPI) Register

func (bapi *BlocksAPI) Register(r *route.Router, tracer opentracing.Tracer, logger log.Logger, ins extpromhttp.InstrumentationMiddleware, logMiddleware *logging.HTTPServerMiddleware)

func (*BlocksAPI) SetGlobal

func (bapi *BlocksAPI) SetGlobal(blocks []metadata.Meta, err error)

SetGlobal updates the global blocks' metadata in the API.

func (*BlocksAPI) SetLoaded

func (bapi *BlocksAPI) SetLoaded(blocks []metadata.Meta, err error)

SetLoaded updates the local blocks' metadata in the API.

type BlocksInfo

type BlocksInfo struct {
	Label       string          `json:"label"`
	Blocks      []metadata.Meta `json:"blocks"`
	RefreshedAt time.Time       `json:"refreshedAt"`
	Err         error           `json:"err"`
}

Jump to

Keyboard shortcuts

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