influxdb

package
v0.58.1-0...-af594cf Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

From is an operation that mocks the real implementation of InfluxDB's from. It is used in Flux to compile queries that resemble real queries issued against InfluxDB. Implementors of the real from are expected to replace its implementation via flux.ReplacePackageValue.

Index

Constants

View Source
const (
	BucketsKind       = "buckets"
	BucketsRemoteKind = "influxdata/influxdb.bucketsRemote"
)
View Source
const (
	FromKind       = "from"
	FromRemoteKind = "influxdata/influxdb.fromRemote"
)
View Source
const ToKind = "to"

ToKind is the kind for the `to` flux function

Variables

View Source
var ToSignature = runtime.MustLookupBuiltinType("influxdata/influxdb", "to")

Functions

Types

type BucketsOpSpec

type BucketsOpSpec struct {
	Org   *NameOrID
	Host  *string
	Token *string
}

func (*BucketsOpSpec) Kind

func (s *BucketsOpSpec) Kind() flux.OperationKind

type BucketsProcedureSpec

type BucketsProcedureSpec struct {
	plan.DefaultCost

	Org   *NameOrID
	Host  *string
	Token *string
}

func (*BucketsProcedureSpec) Copy

func (*BucketsProcedureSpec) GetHost

func (s *BucketsProcedureSpec) GetHost() *string

func (*BucketsProcedureSpec) GetOrg

func (s *BucketsProcedureSpec) GetOrg() *NameOrID

func (*BucketsProcedureSpec) GetToken

func (s *BucketsProcedureSpec) GetToken() *string

func (*BucketsProcedureSpec) Kind

func (*BucketsProcedureSpec) PostPhysicalValidate

func (s *BucketsProcedureSpec) PostPhysicalValidate(id plan.NodeID) error

func (*BucketsProcedureSpec) SetHost

func (s *BucketsProcedureSpec) SetHost(host *string)

func (*BucketsProcedureSpec) SetOrg

func (s *BucketsProcedureSpec) SetOrg(org *NameOrID)

func (*BucketsProcedureSpec) SetToken

func (s *BucketsProcedureSpec) SetToken(token *string)

type BucketsRemoteProcedureSpec

type BucketsRemoteProcedureSpec struct {
	plan.DefaultCost
	*BucketsProcedureSpec
}

func (*BucketsRemoteProcedureSpec) BuildQuery

func (s *BucketsRemoteProcedureSpec) BuildQuery() *ast.File

func (*BucketsRemoteProcedureSpec) Copy

func (*BucketsRemoteProcedureSpec) Kind

func (*BucketsRemoteProcedureSpec) PostPhysicalValidate

func (s *BucketsRemoteProcedureSpec) PostPhysicalValidate(id plan.NodeID) error

type BucketsRemoteRule

type BucketsRemoteRule struct{}

func (BucketsRemoteRule) Name

func (p BucketsRemoteRule) Name() string

func (BucketsRemoteRule) Pattern

func (p BucketsRemoteRule) Pattern() plan.Pattern

func (BucketsRemoteRule) Rewrite

func (p BucketsRemoteRule) Rewrite(ctx context.Context, node plan.Node) (plan.Node, bool, error)

type DefaultFromAttributes

type DefaultFromAttributes struct {
	Org   *NameOrID
	Host  *string
	Token *string
}

DefaultFromAttributes is used to inject default attributes for the various from attributes.

This rule is not added by default. Each process must fill out the suitable defaults and add the rule on startup.

func (DefaultFromAttributes) Name

func (d DefaultFromAttributes) Name() string

func (DefaultFromAttributes) Pattern

func (d DefaultFromAttributes) Pattern() plan.Pattern

func (DefaultFromAttributes) Rewrite

type FromOpSpec

type FromOpSpec struct {
	Org    *NameOrID
	Bucket NameOrID
	Host   *string
	Token  *string
}

func (*FromOpSpec) Kind

func (s *FromOpSpec) Kind() flux.OperationKind

type FromProcedureSpec

type FromProcedureSpec struct {
	plan.DefaultCost

	Org    *NameOrID
	Bucket NameOrID
	Host   *string
	Token  *string
}

func (*FromProcedureSpec) Copy

func (*FromProcedureSpec) GetHost

func (s *FromProcedureSpec) GetHost() *string

func (*FromProcedureSpec) GetOrg

func (s *FromProcedureSpec) GetOrg() *NameOrID

func (*FromProcedureSpec) GetToken

func (s *FromProcedureSpec) GetToken() *string

func (*FromProcedureSpec) Kind

func (*FromProcedureSpec) PostPhysicalValidate

func (s *FromProcedureSpec) PostPhysicalValidate(id plan.NodeID) error

func (*FromProcedureSpec) SetHost

func (s *FromProcedureSpec) SetHost(host *string)

func (*FromProcedureSpec) SetOrg

func (s *FromProcedureSpec) SetOrg(org *NameOrID)

func (*FromProcedureSpec) SetToken

func (s *FromProcedureSpec) SetToken(token *string)

type FromRemoteProcedureSpec

type FromRemoteProcedureSpec struct {
	plan.DefaultCost

	*FromProcedureSpec
	Range           *universe.RangeProcedureSpec
	Transformations []plan.ProcedureSpec
}

func (*FromRemoteProcedureSpec) BuildQuery

func (s *FromRemoteProcedureSpec) BuildQuery() *ast.File

func (*FromRemoteProcedureSpec) Copy

func (*FromRemoteProcedureSpec) Kind

func (*FromRemoteProcedureSpec) PostPhysicalValidate

func (s *FromRemoteProcedureSpec) PostPhysicalValidate(id plan.NodeID) error

type FromRemoteRule

type FromRemoteRule struct{}

func (FromRemoteRule) Name

func (p FromRemoteRule) Name() string

func (FromRemoteRule) Pattern

func (p FromRemoteRule) Pattern() plan.Pattern

func (FromRemoteRule) Rewrite

func (p FromRemoteRule) Rewrite(ctx context.Context, node plan.Node) (plan.Node, bool, error)

type MergeRemoteFilterRule

type MergeRemoteFilterRule struct{}

func (MergeRemoteFilterRule) Name

func (p MergeRemoteFilterRule) Name() string

func (MergeRemoteFilterRule) Pattern

func (p MergeRemoteFilterRule) Pattern() plan.Pattern

func (MergeRemoteFilterRule) Rewrite

func (p MergeRemoteFilterRule) Rewrite(ctx context.Context, node plan.Node) (plan.Node, bool, error)

type MergeRemoteRangeRule

type MergeRemoteRangeRule struct{}

func (MergeRemoteRangeRule) Name

func (p MergeRemoteRangeRule) Name() string

func (MergeRemoteRangeRule) Pattern

func (p MergeRemoteRangeRule) Pattern() plan.Pattern

func (MergeRemoteRangeRule) Rewrite

func (p MergeRemoteRangeRule) Rewrite(ctx context.Context, node plan.Node) (plan.Node, bool, error)

type NameOrID

type NameOrID struct {
	ID   string
	Name string
}

NameOrID signifies the name of an organization/bucket or an ID for an organization/bucket.

func GetNameOrID

func GetNameOrID(args flux.Arguments, nameParam, idParam string) (NameOrID, bool, error)

type ProcedureSpec

type ProcedureSpec interface {
	GetOrg() *NameOrID
	GetHost() *string
	GetToken() *string
	SetOrg(org *NameOrID)
	SetHost(host *string)
	SetToken(token *string)
}

type RemoteProcedureSpec

type RemoteProcedureSpec interface {
	GetOrg() *NameOrID
	GetHost() *string
	GetToken() *string

	BuildQuery() *ast.File
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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