httpserverprocessor

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2019 License: Apache-2.0, Apache-2.0 Imports: 9 Imported by: 0

README

HTTPSERVERPROCESSOR

Listen and read a http request to build events with it.

Processor respond with a HTTP code as :

  • 202 when request has been accepted, in body : the total number of event created
  • 500 when an error occurs, in body : an error description

Use codecs to process body content as json / csv / lines / json lines / ....

URL is available as http://webhookhost/pluginLabel/URI

  • webhookhost is defined by bitfan at startup
  • pluginLabel is defined in pipeline configuration, it's the named processor if you put one, or input_httpserver by default
  • URI is defined in plugin configuration (see below)

Synopsys

SETTING TYPE REQUIRED DEFAULT VALUE
Codec codec false "plain"
Uri string false "events"
headers hash false {}
body array false ["uuid"]

Details

Codec
  • Value type is codec
  • Default value is "plain"

The codec used for input data. Input codecs are a convenient method for decoding your data before it enters the input, without needing a separate filter in your bitfan pipeline

Default decode http request as plain data, response is json encoded. Set multiple codec with role to customize

Uri
  • Value type is string
  • Default value is "events"

URI path

headers
  • Value type is hash
  • Default value is {}

Headers to send back into each outgoing response @LSExample {"X-Processor" => "bitfan"}

body
  • Value type is array
  • Default value is ["uuid"]

What to send back to client ?

Configuration blueprint

httpserverprocessor{
	codec => "plain"
	uri => "events"
	headers => {}
	body => ["uuid"]
}

Documentation

Overview

Code generated by "bitfanDoc "; DO NOT EDIT

Listen and read a http request to build events with it.

Processor respond with a HTTP code as :

* `202` when request has been accepted, in body : the total number of event created * `500` when an error occurs, in body : an error description

Use codecs to process body content as json / csv / lines / json lines / ....

URL is available as http://webhookhost/pluginLabel/URI

* webhookhost is defined by bitfan at startup * pluginLabel is defined in pipeline configuration, it's the named processor if you put one, or `input_httpserver` by default * URI is defined in plugin configuration (see below)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() processors.Processor

Types

This section is empty.

Jump to

Keyboard shortcuts

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