splunk

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package splunk provides Splunk HTTP event collector integration for requestCore logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogSplunk

type LogSplunk struct {
	Logger     string `json:"logger"`
	Severity   string `json:"serverity"`
	Header     string `json:"header,omitempty"`
	Status     int    `json:"status"`
	Client     string `json:"client"`
	Latency    string `json:"latency"`
	LatencyInt int64  `json:"latencyMicro"`
	Method     string `json:"method"`
	Path       string `json:"path"`
	Error      string `json:"error,omitempty"`
}

LogSplunk represents the JSON structure of a Gin log entry sent to Splunk.

type SplunkLog

type SplunkLog struct {
	Event      string `json:"event"`
	SourceType string `json:"sourcetype"`
	Source     string `json:"-"`
	Index      string `json:"-"`
}

SplunkLog represents the structure of a log event sent to Splunk.

type SplunkLogger

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

SplunkLogger is a logger that sends logs to Splunk.

func CheckIfSplunkIsWorking

func CheckIfSplunkIsWorking(params *libParams.SplunkParams) (*SplunkLogger, error)

CheckIfSplunkIsWorking tests the Splunk connection by sending a test log.

func (SplunkLogger) Write

func (j SplunkLogger) Write(p []byte) (n int, err error)

Write sends a log message to Splunk async.

Jump to

Keyboard shortcuts

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