splunk

package
v0.0.0-...-a2f2a9e Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MaxContentLength = 10000

Functions

This section is empty.

Types

type Config

type Config struct {
	EndpointURL string `json:"endpoint_url" validate:"required,url" required:"true"`
	Token       string `json:"token" validate:"required,min=1" required:"true"`
}

type HECEvent

type HECEvent struct {
	Event map[string]interface{} `json:"event"`
}

HECEvent represents an event for the Splunk HTTP Event Collector (HEC) API

type Splunk

type Splunk struct {
	Config           Config                  `json:"config"`
	IntegrationType  string                  `json:"integration_type"`
	NotificationType string                  `json:"notification_type"`
	Filters          reporters.FieldsFilters `json:"filters"`
	Message          string                  `json:"message"`
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, b []byte) (Splunk, error)

func (Splunk) IsValidCredential

func (s Splunk) IsValidCredential(ctx context.Context) (bool, error)

todo

func (Splunk) SendNotification

func (s Splunk) SendNotification(ctx context.Context, message string, extras map[string]interface{}) error

func (Splunk) Sender

func (s Splunk) Sender(in chan []byte, wg *sync.WaitGroup)

func (Splunk) ValidateConfig

func (s Splunk) ValidateConfig(validate *validator.Validate) error

Jump to

Keyboard shortcuts

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