sendhec

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sess added in v0.0.3

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

Sess stores sendhec session state.

func New

func New(hecURL, hecToken string) *Sess

New creates a new sendhec object/session. It requires a Splunk HEC URL and HEC token (typically, GUID).

func (*Sess) CloseSvc added in v0.0.3

func (sender *Sess) CloseSvc() error

CloseSvc closes the open session. CloseSvc must not be called when no session is open.

func (*Sess) OpenSvc added in v0.0.3

func (sender *Sess) OpenSvc() error

OpenSvc opens a new session. OpenSvc must not be called when a session is already open.

func (*Sess) SendMessage added in v0.0.3

func (sender *Sess) SendMessage(logEvent logevent.LogEvent) error

SendMessage sends a LogEvent to a Splunk HTTP Event Collector.

func (*Sess) SetHecInsecure added in v0.0.3

func (sender *Sess) SetHecInsecure(v bool)

SetHecInsecure disables SSL/TLS validation. THIS IS INSECURE but may be useful in dev/lab environments.

func (*Sess) SetTrace added in v0.0.3

func (sender *Sess) SetTrace(v bool)

SetTrace enables tracing, which dumps all messages to stderr.

Jump to

Keyboard shortcuts

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