offload

package
v1.1.18 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package offload offload data to other data sinks

Index

Constants

View Source
const DKRcv = "datakit-http"

Variables

This section is empty.

Functions

func InitLog

func InitLog()

Types

type DKRecver

type DKRecver struct {
	Addresses []string
	AddrMap   []map[point.Category]string

	sync.Mutex
	// contains filtered or unexported fields
}

func NewDKRecver

func NewDKRecver(addresses []string) (*DKRecver, error)

func (*DKRecver) Send

func (recevier *DKRecver) Send(s uint64, cat point.Category, data []*point.Point) error

type OffloadConfig

type OffloadConfig struct {
	Receiver  string   `toml:"receiver"`
	Addresses []string `toml:"addresses"`
}

type OffloadWorker

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

func NewOffloader

func NewOffloader(cfg *OffloadConfig) (*OffloadWorker, error)

func (*OffloadWorker) Customer

func (offload *OffloadWorker) Customer(ctx context.Context, cat point.Category) error

func (*OffloadWorker) Send

func (offload *OffloadWorker) Send(cat point.Category, pts []*point.Point) error

func (*OffloadWorker) Stop

func (offload *OffloadWorker) Stop()

type Receiver

type Receiver interface {
	// thread safety
	Send(s uint64, cat point.Category, data []*point.Point) error
}

Jump to

Keyboard shortcuts

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