influxdb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTimePointNotIncluded = errors.New("time point not included in this data file")

Functions

This section is empty.

Types

type ExportOptions

type ExportOptions struct {
	Hostname string
	Target   time.Time
	ShowOnly bool

	WriteDb   bool
	Org       string
	Bucket    string
	Token     string
	DbAddress string

	Bar *progressbar.ProgressBar
}

type FastExporter

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

func NewFastExporter

func NewFastExporter(f string, fs afero.Fs) (*FastExporter, error)

NewFastExporter creates a new exporter f: file path fs: A mock for unit test. Pass nil for a real fs.

func (*FastExporter) Close

func (r *FastExporter) Close()

func (*FastExporter) Export

func (r *FastExporter) Export(w io.Writer, option *ExportOptions) error

func (*FastExporter) ReadAt

func (r *FastExporter) ReadAt(offset int64, len uint32) ([]byte, error)

func (*FastExporter) ReadRange

func (r *FastExporter) ReadRange(ra Range) ([]byte, error)

func (*FastExporter) Scan

func (r *FastExporter) Scan() ([]RecordRange, error)

func (*FastExporter) UnmarshalMetric

func (r *FastExporter) UnmarshalMetric(buf []byte) (*gproto.Metric, error)

type ImportOption

type ImportOption struct {
	Bucket   string
	Org      string
	Token    string
	Address  string
	Hostname string
}

type Importer

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

func NewImporter

func NewImporter(option *ImportOption) *Importer

func (*Importer) Close

func (im *Importer) Close()

func (*Importer) Submit

func (im *Importer) Submit(metric *gproto.Metric) error

type LineProtocolExporter

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

func New

func New(hostname string, writer io.Writer) *LineProtocolExporter

func (*LineProtocolExporter) ExportMetric

func (e *LineProtocolExporter) ExportMetric(m *gproto.Metric)

func (*LineProtocolExporter) Printf

func (e *LineProtocolExporter) Printf(format string, a ...any)

type MetricConv

type MetricConv struct {
	Hostname string
}

func NewMetricConv

func NewMetricConv(hostname string) *MetricConv

func (*MetricConv) Metric

func (c *MetricConv) Metric(metric *gproto.Metric) (int64, []*write.Point)

func (*MetricConv) Net

func (c *MetricConv) Net(metric *gproto.NetstatMetric) []*write.Point

func (*MetricConv) Nic

func (c *MetricConv) Nic(metric *gproto.NicMetric) []*write.Point

func (*MetricConv) Tcp

func (c *MetricConv) Tcp(metric *gproto.TcpMetric) []*write.Point

type Range

type Range struct {
	Offset int64
	Len    uint32
}

type RecordRange

type RecordRange struct {
	Header Range
	Body   Range
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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