http

package module
v0.0.0-...-61c49ca Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: MIT Imports: 20 Imported by: 0

README

beats-http-output

HTTP output for the Elastic Beats framework

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotConnected indicates failure due to client having no valid connection
	ErrNotConnected = errors.New("not connected")

	// ErrJSONEncodeFailed indicates encoding failures
	ErrJSONEncodeFailed = errors.New("json encode failed")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	Connection
	// contains filtered or unexported fields
}

Client struct

func NewClient

func NewClient(s ClientSettings) (*Client, error)

NewClient instantiate a client.

func (*Client) BatchPublishEvent

func (client *Client) BatchPublishEvent(data []publisher.Event) error

BatchPublishEvent publish a single event to output.

func (*Client) Clone

func (client *Client) Clone() *Client

Clone clones a client.

func (*Client) Publish

func (client *Client) Publish(batch publisher.Batch) error

Publish sends events to the clients sink.

func (*Client) PublishEvent

func (client *Client) PublishEvent(data publisher.Event) error

PublishEvent publish a single event to output.

func (*Client) String

func (client *Client) String() string

type ClientSettings

type ClientSettings struct {
	URL                string
	Proxy              *url.URL
	TLS                *transport.TLSConfig
	Username, Password string
	Parameters         map[string]string
	Index              outil.Selector
	Pipeline           *outil.Selector
	Timeout            time.Duration
	CompressionLevel   int
	Observer           outputs.Observer
	BatchPublish       bool

	ContentType string
	// contains filtered or unexported fields
}

ClientSettings struct

type Connection

type Connection struct {
	URL      string
	Username string
	Password string

	ContentType string
	// contains filtered or unexported fields
}

Connection struct

func (*Connection) Close

func (conn *Connection) Close() error

Close closes a connection.

func (*Connection) Connect

func (conn *Connection) Connect() error

Connect establishes a connection to the clients sink.

Jump to

Keyboard shortcuts

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