Documentation
¶
Index ¶
- func CreateJob(client *splunk.SplunkClient, spRequest *SearchRequest, service string) (string, error)
- func GetJob(client *splunk.SplunkClient) (*http.Response, error)
- func GetMetricFromNewJob(client *splunk.SplunkClient, spRequest *SearchRequest) (float64, error)
- func HttpJobRequest(client *splunk.SplunkClient, method string, spRequest *SearchRequest) (*http.Response, error)
- func PostJob(client *splunk.SplunkClient, spRequest *SearchRequest) (*http.Response, error)
- func RetrieveJobResult(client *splunk.SplunkClient, sid string) ([]map[string]string, error)
- type SearchParams
- type SearchRequest
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 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 ¶
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 }
Click to show internal directories.
Click to hide internal directories.