Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultBatchSize = 250
View Source
const DefaultInterval = 5 * time.Second
Variables ¶
View Source
var ( // This error is returned by methods of the `Client` interface when they are // called after the client was already closed. ErrClosed = errors.New("the client was already closed") // This error is used to notify the application that too many requests are // already being sent and no more messages can be accepted. ErrTooManyRequests = errors.New("too many requests are already in-flight") )
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.0.1
type Config struct {
EndPointURL string
Tags []string
Host string
Level logrus.Level
Interval time.Duration
BatchSize int
Verbose bool
GZip bool
// The retry policy used by the client to resend requests that have failed.
// The function is called with how many times the operation has been retried
// and is expected to return how long the client should wait before trying
// again.
// If not set the client will fallback to use a default retry policy.
RetryAfter func(int) time.Duration
// contains filtered or unexported fields
}
type ConfigError ¶ added in v1.0.1
type ConfigError struct {
Reason string
Field string
// The value of the configuration field that caused the error.
Value interface{}
}
ConfigError is returned by the `NewWithConfig` function when the one of the configuration fields was set to an impossible value (like a negative duration).
func (ConfigError) Error ¶ added in v1.0.1
func (e ConfigError) Error() string
type SumoLogicHook ¶
type SumoLogicHook struct {
// contains filtered or unexported fields
}
func NewWithConfig ¶ added in v1.0.1
func NewWithConfig(c Config) (*SumoLogicHook, error)
func (*SumoLogicHook) Flush ¶
func (h *SumoLogicHook) Flush() (err error)
func (*SumoLogicHook) Levels ¶
func (h *SumoLogicHook) Levels() []logrus.Level
type SumoLogicMesssage ¶
Click to show internal directories.
Click to hide internal directories.