remotestorage

package
v0.0.0-...-2a93a25 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMissingTenantHeader = errors.New("the tenant header is missing")
	ErrParseTTLHeader      = errors.New("can't parse time to live header ")
)
View Source
var (
	ErrInvalidMatcher = errors.New("invalid labels")
	ErrNotImplemented = errors.New("not implemented")
)
View Source
var ErrIsReadOnly = errors.New("trying to write but read-only mode is enabled")

Functions

func New

func New(
	writer types.MetricWriter,
	index types.Index,
	maxConcurrentRemoteWrite int,
	tenantLabelName string,
	mutableLabelDetector MutableLabelDetector,
	requireTenantHeader bool,
	reg prometheus.Registerer,
) storage.Appendable

New returns a new initialized appendable storage.

func NewReadOnly

func NewReadOnly() storage.Appendable

NewReadOnly return a appended in read-only mode. That is one that return ErrIsReadOnly on all writes.

Types

type MutableLabelDetector

type MutableLabelDetector interface {
	IsMutableLabel(ctx context.Context, tenant, name string) (bool, error)
}

type RemoteStorage

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

func (*RemoteStorage) Appender

func (r *RemoteStorage) Appender(ctx context.Context) storage.Appender

Jump to

Keyboard shortcuts

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