Documentation ¶
Index ¶
Constants ¶
View Source
const ( PayloadsChannelSize = 1000 // in seconds, how often batched events should be sent SendFrequency = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SplunkEvent ¶
type SplunkHook ¶
type SplunkHook struct {
// contains filtered or unexported fields
}
func NewSplunkHook ¶
func NewSplunkHook(context context.Context, host, port, token, source string) (*SplunkHook, error)
func (*SplunkHook) Levels ¶
func (sh *SplunkHook) Levels() []logrus.Level
type SplunkLogger ¶
type SplunkLogger struct {
// contains filtered or unexported fields
}
func NewSplunkLogger ¶
func NewSplunkLogger(context context.Context, url, token, source, hostname string) *SplunkLogger
func (*SplunkLogger) LogWithTime ¶
func (sl *SplunkLogger) LogWithTime(t time.Time, msg string) error
func (*SplunkLogger) SendPayloads ¶
func (sl *SplunkLogger) SendPayloads(payloads []*SplunkPayload) error
type SplunkPayload ¶
type SplunkPayload struct { // splunk expects unix time in seconds Time int64 `json:"time"` Host string `json:"host"` Event SplunkEvent `json:"event"` }
Click to show internal directories.
Click to hide internal directories.