HTTP¶
This consumer opens up an HTTP 1.1 server and processes the contents of any incoming HTTP request.
Parameters¶
Enable (default: true)
Switches this plugin on or off.
Address (default: :80)
Defines the TCP port and optional IP address to listen on. Sets http.Server.Addr; for defails, see its Go documentation. Syntax: [hostname|address]:<port>
ReadTimeoutSec (default: 3, unit: sec)
Defines the maximum duration in seconds before timing out the HTTP read request. Sets http.Server.ReadTimeout; for details, see its Go documentation.
WithHeaders (default: true)
If true, relays the complete HTTP request to the generated Gollum message. If false, relays only the HTTP request body and ignores headers.
Htpasswd
Path to an htpasswd-formatted password file. If defined, turns on HTTP Basic Authentication in the server.
BasicRealm
Defines the Authentication Realm for HTTP Basic Authentication. Meaningful only in conjunction with Htpasswd.
Certificate
Path to an X509 formatted certificate file. If defined, turns on SSL/TLS support in the HTTP server. Requires PrivateKey to be set.
PrivateKey
Path to an X509 formatted private key file. Meaningful only in conjunction with Certificate.
Parameters (from core.SimpleConsumer)¶
Streams
Defines a list of streams a consumer will send to. This parameter is mandatory. When using “*” messages will be sent only to the internal “*” stream. It will NOT send messages to all streams. By default this parameter is set to an empty list.
ShutdownTimeoutMs (default: 1000, unit: ms)
Defines the maximum time in milliseconds a consumer is allowed to take to shut down. After this timeout the consumer is always considered to have shut down. By default this parameter is set to 1000.
Modulators
Defines a list of modulators to be applied to a message before it is sent to the list of streams. If a modulator specifies a stream, the message is only sent to that specific stream. A message is saved as original after all modulators have been applied. By default this parameter is set to an empty list.
ModulatorRoutines
Defines the number of go routines reserved for modulating messages. Setting this parameter to 0 will use as many go routines as the specific consumer plugin is using for fetching data. Any other value will force the given number fo go routines to be used. By default this parameter is set to 0
ModulatorQueueSize
Defines the size of the channel used to buffer messages before they are fetched by the next free modulator go routine. If the ModulatorRoutines parameter is set to 0 this parameter is ignored. By default this parameter is set to 1024.
Examples¶
This example listens on port 9090 and writes to the stream “http_in_00”.
"HttpIn00":
Type: "consumer.HTTP"
Streams: "http_in_00"
Address: "localhost:9090"
WithHeaders: false