Documentation ¶
Index ¶
- func FieldListToJSON(fieldList []*telegraf.Field) ([]byte, error)
- func FullTableName(schema, name string) pgx.Identifier
- func GetTagID(metric telegraf.Metric) int64
- func QuoteIdentifier(name string) string
- func QuoteLiteral(name string) string
- func TagListToJSON(tagList []*telegraf.Tag) []byte
- type Column
- type ColumnList
- type ColumnRole
- type PGXLogger
- type WaitGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FullTableName ¶
func FullTableName(schema, name string) pgx.Identifier
FullTableName returns a sanitized table name with its schema (if supplied)
func QuoteIdentifier ¶
QuoteIdentifier returns a sanitized string safe to use in SQL as an identifier
func QuoteLiteral ¶
QuoteLiteral returns a sanitized string safe to use in sql as a string literal
func TagListToJSON ¶
Types ¶
type Column ¶
type Column struct { Name string // the data type of each column should have in the db. used when checking // if the schema matches or it needs updates Type string // the role each column has, helps properly map the metric to the db Role ColumnRole }
type ColumnList ¶
type ColumnList []Column
ColumnList implements sort.Interface. Columns are sorted first into groups of time,tag_id,tags,fields, and then alphabetically within each group.
func (ColumnList) Len ¶
func (cl ColumnList) Len() int
func (ColumnList) Less ¶
func (cl ColumnList) Less(i, j int) bool
func (ColumnList) Sort ¶
func (cl ColumnList) Sort()
func (ColumnList) Swap ¶
func (cl ColumnList) Swap(i, j int)
type ColumnRole ¶
type ColumnRole int
ColumnRole specifies the role of a column in a metric. It helps map the columns to the DB.
const ( TimeColType ColumnRole = iota + 1 TagsIDColType TagColType FieldColType )
type WaitGroup ¶
type WaitGroup struct {
// contains filtered or unexported fields
}
WaitGroup is similar to sync.WaitGroup, but allows interruptable waiting (e.g. a timeout).
func NewWaitGroup ¶
func NewWaitGroup() *WaitGroup
Click to show internal directories.
Click to hide internal directories.