http

package
v0.33.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ToHTTPKind           = "toHTTP"
	DefaultToHTTPTimeout = 1 * time.Second
)

Variables

View Source
var DefaultToHTTPUserAgent = "fluxd/dev"

DefaultToHTTPUserAgent is the default user agent used by ToHttp

Functions

This section is empty.

Types

type ToHTTPOpSpec

type ToHTTPOpSpec struct {
	URL          string            `json:"url"`
	Method       string            `json:"method"` // default behavior should be POST
	Name         string            `json:"name"`
	NameColumn   string            `json:"nameColumn"` // either name or name_column must be set, if none is set try to use the "_measurement" column.
	Headers      map[string]string `json:"headers"`    // TODO: implement Headers after bug with keys and arrays and objects is fixed (new parser implemented, with string literals as keys)
	URLParams    map[string]string `json:"urlParams"`  // TODO: implement URLParams after bug with keys and arrays and objects is fixed (new parser implemented, with string literals as keys)
	Timeout      time.Duration     `json:"timeout"`    // default to something reasonable if zero
	NoKeepAlive  bool              `json:"noKeepAlive"`
	TimeColumn   string            `json:"timeColumn"`
	TagColumns   []string          `json:"tagColumns"`
	ValueColumns []string          `json:"valueColumns"`
}

func (ToHTTPOpSpec) Kind

func (*ToHTTPOpSpec) ReadArgs

func (o *ToHTTPOpSpec) ReadArgs(args flux.Arguments) error

ReadArgs loads a flux.Arguments into ToHTTPOpSpec. It sets several default values. If the http method isn't set, it defaults to POST, it also uppercases the http method. If the time_column isn't set, it defaults to execute.TimeColLabel. If the value_column isn't set it defaults to a []string{execute.DefaultValueColLabel}.

func (*ToHTTPOpSpec) UnmarshalJSON

func (o *ToHTTPOpSpec) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON unmarshals and validates toHTTPOpSpec into JSON.

type ToHTTPProcedureSpec

type ToHTTPProcedureSpec struct {
	plan.DefaultCost
	Spec *ToHTTPOpSpec
}

func (*ToHTTPProcedureSpec) Copy

func (*ToHTTPProcedureSpec) Kind

type ToHTTPTransformation

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

func (*ToHTTPTransformation) Finish

func (t *ToHTTPTransformation) Finish(id execute.DatasetID, err error)

func (*ToHTTPTransformation) Process

func (t *ToHTTPTransformation) Process(id execute.DatasetID, tbl flux.Table) error

func (*ToHTTPTransformation) RetractTable

func (t *ToHTTPTransformation) RetractTable(id execute.DatasetID, key flux.GroupKey) error

func (*ToHTTPTransformation) UpdateProcessingTime

func (t *ToHTTPTransformation) UpdateProcessingTime(id execute.DatasetID, pt execute.Time) error

func (*ToHTTPTransformation) UpdateWatermark

func (t *ToHTTPTransformation) UpdateWatermark(id execute.DatasetID, pt execute.Time) error

Jump to

Keyboard shortcuts

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