Documentation ¶
Index ¶
- Variables
- type ExportOptions
- type FastExporter
- func (r *FastExporter) Close()
- func (r *FastExporter) Export(w io.Writer, option *ExportOptions) error
- func (r *FastExporter) ReadAt(offset int64, len uint32) ([]byte, error)
- func (r *FastExporter) ReadRange(ra Range) ([]byte, error)
- func (r *FastExporter) Scan() ([]RecordRange, error)
- func (r *FastExporter) UnmarshalMetric(buf []byte) (*gproto.Metric, error)
- type ImportOption
- type Importer
- type LineProtocolExporter
- type MetricConv
- type Range
- type RecordRange
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 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) Scan ¶
func (r *FastExporter) Scan() ([]RecordRange, error)
func (*FastExporter) UnmarshalMetric ¶
func (r *FastExporter) UnmarshalMetric(buf []byte) (*gproto.Metric, error)
type ImportOption ¶
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
func NewImporter ¶
func NewImporter(option *ImportOption) *Importer
type LineProtocolExporter ¶
type LineProtocolExporter struct {
// contains filtered or unexported fields
}
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) Net ¶
func (c *MetricConv) Net(metric *gproto.NetstatMetric) []*write.Point
type RecordRange ¶
Click to show internal directories.
Click to hide internal directories.