Help us shape the future of Go! Take the 2026 Go Developer Survey

splunk

package
v1.4.27 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package splunk provides bounded, scoped Splunk search-job reads for native tools.

Index

Constants

View Source
const MaximumLimit = 50

Variables

View Source
var ErrCleanup = errors.New("splunk: job cleanup unconfirmed")
View Source
var ErrInvalidArgument = errors.New("splunk: invalid argument")
View Source
var ErrInvalidConfig = errors.New("splunk: invalid configuration")
View Source
var ErrRead = errors.New("splunk: read failed")
View Source
var ErrResponseTooLarge = errors.New("splunk: response too large")
View Source
var ErrUnsupportedScope = errors.New("splunk: configured search cannot be safely scoped")

Functions

This section is empty.

Types

type DiscoveryRequest

type DiscoveryRequest struct {
	Search string
	Limit  int
}

type DiscoveryResult

type DiscoveryResult struct {
	Fields     []string `json:"fields"`
	Count      int      `json:"count"`
	Coverage   string   `json:"coverage"`
	Truncated  bool     `json:"truncated"`
	Truncation []string `json:"truncation"`
}

type ReadRequest

type ReadRequest struct {
	Filters  map[string]string
	Lookback time.Duration
	Limit    int
}

type ReadResult

type ReadResult struct {
	Records    []Record `json:"records"`
	Count      int      `json:"count"`
	Partial    bool     `json:"partial"`
	Truncated  bool     `json:"truncated"`
	Truncation []string `json:"truncation,omitempty"`
}

type Record

type Record struct {
	Timestamp string            `json:"timestamp"`
	Message   string            `json:"message"`
	Fields    map[string]string `json:"fields"`
}

type Service

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

func NewService

func NewService(cfg config.AgentSplunkSourceConfig, scrubber core.Scrubber) (*Service, error)

func (*Service) Discover

func (service *Service) Discover(ctx context.Context, request DiscoveryRequest) (DiscoveryResult, error)

func (*Service) Read

func (service *Service) Read(ctx context.Context, request ReadRequest) (ReadResult, error)

Jump to

Keyboard shortcuts

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