Documentation
¶
Index ¶
Constants ¶
This section is empty.
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 ¶
type Config struct {
EndPointURL string
Tags []string
Host string
Level logrus.Level
Verbose bool
GZip bool
// The maximum number of goroutines that will be spawned by a client to send
// requests to the backend API.
// This field is not exported and only exposed internally to let unit tests
// mock the current time.
MaxConcurrentRequests int
// 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
}
type ConfigError ¶
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 ¶
func (e ConfigError) Error() string
type SumoLogicHook ¶
type SumoLogicHook struct {
// contains filtered or unexported fields
}
func NewWithConfig ¶
func NewWithConfig(c Config) (*SumoLogicHook, error)
func (*SumoLogicHook) Flush ¶
func (h *SumoLogicHook) Flush() (err error)
func (*SumoLogicHook) Levels ¶
func (h *SumoLogicHook) Levels() []logrus.Level
Click to show internal directories.
Click to hide internal directories.