omloader

package module
v0.0.0-...-f47c3f9 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoogleWatcher

func NewGoogleWatcher(logger *zap.Logger, processor Processor, config GoogleWatcherConfig) (*googleWatcher, error)

Types

type GoogleStorage

type GoogleStorage interface {
	Storage
	RegisterFinalizeNotification(bucketName, projectID, topicID string) error
}

func NewGoogleStorage

func NewGoogleStorage() (GoogleStorage, error)

type GoogleWatcherConfig

type GoogleWatcherConfig struct {
	ProjectID      string
	TopicID        string
	BucketName     string
	BucketPath     string
	SubscriptionID string
}

type HttpSenderConfig

type HttpSenderConfig struct {
	URL string
}

type LabelMutatorFn

type LabelMutatorFn func(labels []prompb.Label) []prompb.Label

type Processor

type Processor interface {
	Process(reader io.Reader) error
	AddMutator(mutator LabelMutatorFn)
}

func NewProcessor

func NewProcessor(logger *zap.Logger, sender Sender) Processor

type Reader

type Reader interface {
	Read() error
}

func NewOpenMetricsReader

func NewOpenMetricsReader(reader io.Reader, output chan<- *prompb.TimeSeries) Reader

type Sender

type Sender interface {
	Send(timeSeriesSlice []prompb.TimeSeries) error
}

func NewHttpSender

func NewHttpSender(config HttpSenderConfig) Sender

type Storage

type Storage interface {
	Read(path string) (io.ReadCloser, error)
	Move(src, dst string) error
	Delete(path string) error
	io.Closer
}

func NewFileStorage

func NewFileStorage() Storage

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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