jobs

package
v0.0.0-...-b8551e4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJob

func CreateJob(client *splunk.SplunkClient, spRequest *SearchRequest, service string) (string, error)

this function create a new job and return its SID

func GetJob

func GetJob(client *splunk.SplunkClient) (*http.Response, error)

func GetMetricFromNewJob

func GetMetricFromNewJob(client *splunk.SplunkClient, spRequest *SearchRequest) (float64, error)

Return a metric from a new created job

func HttpJobRequest

func HttpJobRequest(client *splunk.SplunkClient, method string, spRequest *SearchRequest) (*http.Response, error)

func PostJob

func PostJob(client *splunk.SplunkClient, spRequest *SearchRequest) (*http.Response, error)

func RetrieveJobResult

func RetrieveJobResult(client *splunk.SplunkClient, sid string) ([]map[string]string, error)

return the result of a job get by its SID

Types

type SearchParams

type SearchParams struct {
	// splunk search in spl syntax
	SearchQuery string
	OutputMode  string `default:"json"`
	// splunk returns a job SID only if the job is complete
	ExecMode string `default:"blocking"`
	// earliest (inclusive) time bounds for the search
	EarliestTime string
	// latest (exclusive) time bounds for the search
	LatestTime string
}

type SearchRequest

type SearchRequest struct {
	Headers map[string]string
	Params  SearchParams
}

Jump to

Keyboard shortcuts

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