Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeSender ¶
func MakeSender(info ConnectionInfo) (send.Sender, error)
MakeSender constructs a new Sender implementation that sends messages to a Splunk event collector using the credentials specified in the SplunkConnectionInfo struct.
func MakeSenderWithClient ¶
MakeSenderWithClient makes it possible to pass an existing http.Client to the splunk instance, but is otherwise identical to MakeSender.
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct { ServerURL string `bson:"url" json:"url" yaml:"url"` Token string `bson:"token" json:"token" yaml:"token"` Channel string `bson:"channel" json:"channel" yaml:"channel"` }
ConnectionInfo stores all information needed to connect to a splunk server to send log messsages.
func GetConnectionInfo ¶
func GetConnectionInfo() ConnectionInfo
GetConnectionInfo builds a SplunkConnectionInfo structure reading default values from the following environment variables:
GRIP_SPLUNK_SERVER_URL GRIP_SPLUNK_CLIENT_TOKEN GRIP_SPLUNK_CHANNEL
func (ConnectionInfo) Populated ¶
func (info ConnectionInfo) Populated() bool
Populated validates a SplunkConnectionInfo, and returns false if there is missing data.
Click to show internal directories.
Click to hide internal directories.