Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 509 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 509 Bytes

Splunk REST API Client

Example Usage:

package main

import (
    "fmt"
    "github.com/drewrm/splunk"
)

func main() {
    conn := splunk.SplunkConnection {
            Username: "admin",
            Password: "changeme",
            BaseURL: "https://localhost:8089",
    }

    key, err:= conn.Login()

    if err != nil {
            fmt.Println("Couldn't login to splunk: ", err)
    }

    fmt.Println("Session key: ", key.Value)
}