convert

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2018 License: Apache-2.0, MIT Imports: 5 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ReservedFieldNameID is the field name used to index the ID in the
	// m3ninx subsytem.
	ReservedFieldNameID = doc.IDReservedFieldName

	// ErrUsingReservedFieldName is the error returned when a metric
	// cannot be parsed due to using a resereved field name
	ErrUsingReservedFieldName = errors.New(
		"unable to parse metric using reserved field name: " +
			string(ReservedFieldNameID))
)

Functions

func FromMetric

func FromMetric(id ident.ID, tags ident.Tags) (doc.Document, error)

FromMetric converts the provided metric id+tags into a document. FOLLOWUP(r): Rename FromMetric to FromSeries (metric terminiology is not common in the codebase)

func FromMetricIter

func FromMetricIter(id ident.ID, tags ident.TagIterator) (doc.Document, error)

FromMetricIter converts the provided metric id+tags into a document. FOLLOWUP(r): Rename FromMetric to FromSeries (metric terminiology is not common in the codebase)

func FromMetricIterNoClone

func FromMetricIterNoClone(id ident.ID, tags ident.TagIterator) (doc.Document, error)

FromMetricIterNoClone converts the provided metric id+tags iterator into a document without cloning.

func FromMetricNoClone

func FromMetricNoClone(id ident.ID, tags ident.Tags) (doc.Document, error)

FromMetricNoClone converts the provided metric id+tags into a document without cloning.

func ToMetric

func ToMetric(d doc.Document, opts Opts) (ident.ID, ident.TagIterator, error)

ToMetric converts the provided doc to metric id+tags.

func ValidateMetric

func ValidateMetric(id ident.ID, tags ident.Tags) error

ValidateMetric will validate a metric for use in the m3ninx subsytem FOLLOWUP(r): Rename ValidateMetric to ValidateSeries (metric terminiology is not common in the codebase)

Types

type Opts

type Opts struct {
	IdentPool        ident.Pool
	CheckedBytesPool pool.CheckedBytesPool
}

Opts are the pools required for conversions.

Jump to

Keyboard shortcuts

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