Documentation ¶
Index ¶
- type Message
- type MessageContent
- type MessageSeverity
- type Messages
- type Row
- type Rows
- type SessionKey
- type SplunkConnection
- func (conn SplunkConnection) GetMessage(name string) ([]Message, error)
- func (conn SplunkConnection) HasSessionKey() bool
- func (conn SplunkConnection) InstallApp(path string, update bool) (string, error)
- func (conn SplunkConnection) Login() (key SessionKey, err error)
- func (conn SplunkConnection) RestartServer() (string, error)
- func (conn SplunkConnection) Search(ctx context.Context, boPolicy backoff.Policy, searchString string, ...) (rows []Row, events []string, err error)
- func (conn SplunkConnection) SearchStream(searchString string, params ...map[string]string) (events chan *Row, err error)
- func (conn SplunkConnection) SendMessage(message *Message) (string, error)
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Name string `json:"name"` Content MessageContent `json:"content"` }
type MessageContent ¶
type MessageContent struct { Message string `json:"message"` Severity MessageSeverity `json:"severity"` // contains filtered or unexported fields }
func (*MessageContent) Content ¶
func (mc *MessageContent) Content() time.Time
type MessageSeverity ¶
type MessageSeverity string
const ( Info MessageSeverity = "info" Warn MessageSeverity = "warn" Error MessageSeverity = "error" )
type Row ¶
type SessionKey ¶
type SessionKey struct {
Value string `json:"sessionKey"`
}
SessionKey represents the JSON object returned from the Splunk authentication REST call
type SplunkConnection ¶
type SplunkConnection struct {
Username, Password, BaseURL, SplunkUser, SplunkApp string
BearerToken string
HttpClient *http.Client
// contains filtered or unexported fields
}
func (SplunkConnection) GetMessage ¶
func (conn SplunkConnection) GetMessage(name string) ([]Message, error)
func (SplunkConnection) HasSessionKey ¶
func (conn SplunkConnection) HasSessionKey() bool
func (SplunkConnection) InstallApp ¶
func (conn SplunkConnection) InstallApp(path string, update bool) (string, error)
func (SplunkConnection) Login ¶
func (conn SplunkConnection) Login() (key SessionKey, err error)
Login connects to the Splunk server and retrieves a session key
func (SplunkConnection) RestartServer ¶
func (conn SplunkConnection) RestartServer() (string, error)
func (SplunkConnection) SearchStream ¶
func (SplunkConnection) SendMessage ¶
func (conn SplunkConnection) SendMessage(message *Message) (string, error)
SendMessage sends an informational message to Splunk
Click to show internal directories.
Click to hide internal directories.