sendhec

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 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

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

func (sender *Sess) CloseSvc() error

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

func (*Sess) OpenSvc

func (sender *Sess) OpenSvc() error

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

func (*Sess) SendMessage

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

SendMessage sends a LogEvent to a Splunk HTTP Event Collector.

func (*Sess) SetHecInsecure

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

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