Documentation ¶
Index ¶
- func AppendError(err error, other error) error
- func DeregisterDestination(name string)
- func DeregisterSource(name string)
- func DestinationsAvailable() (destinations []string)
- func RegisterDestination(name string, destination Destination)
- func RegisterSource(name string, source Source)
- func SourcesAvailable() (sources []string)
- type Destination
- type DestinationFunc
- type ErrorList
- type Group
- func (group *Group) Add(msg Message, now time.Time) (stream *Stream)
- func (group *Group) ForEach(f func(*Stream))
- func (group *Group) HasExpired(timeout time.Duration, now time.Time) bool
- func (group *Group) Name() string
- func (group *Group) RemoveExpired(timeout time.Duration, now time.Time) (streams []*Stream)
- func (group *Group) String() string
- type LogHandler
- type LogLevel
- type Message
- type MessageBatch
- type MessageQueue
- type Reader
- type Source
- type SourceFunc
- type Store
- type Stream
- func (stream *Stream) Add(msg Message, now time.Time)
- func (stream *Stream) Flush(limits StreamLimits, now time.Time) (list MessageBatch, reason string)
- func (stream *Stream) Group() string
- func (stream *Stream) HasExpired(timeout time.Duration, now time.Time) bool
- func (stream *Stream) Name() string
- func (stream *Stream) String() string
- type StreamLimits
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendError ¶
func DeregisterDestination ¶
func DeregisterDestination(name string)
func DeregisterSource ¶
func DeregisterSource(name string)
func DestinationsAvailable ¶
func DestinationsAvailable() (destinations []string)
func RegisterDestination ¶
func RegisterDestination(name string, destination Destination)
func RegisterSource ¶
func SourcesAvailable ¶
func SourcesAvailable() (sources []string)
Types ¶
type Destination ¶
type Destination interface { Open(group string, stream string) (Writer, error) Close(group string, stream string) }
func GetDestination ¶
func GetDestination(name string) (destination Destination)
func GetDestinations ¶
func GetDestinations(names ...string) (destinations []Destination)
type DestinationFunc ¶
func (DestinationFunc) Close ¶
func (f DestinationFunc) Close(group string, stream string)
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func (*Group) HasExpired ¶
func (*Group) RemoveExpired ¶
type LogHandler ¶
type LogHandler struct { Group string Stream string Hostname string Queue *MessageQueue }
type Message ¶
type Message struct { Group string `json:"group,omitempty"` Stream string `json:"stream,omitempty"` Event ecslogs.Event `json:"event,omitempty"` }
func (Message) ContentLength ¶
type MessageBatch ¶
type MessageBatch []Message
func (MessageBatch) Len ¶
func (list MessageBatch) Len() int
func (MessageBatch) Swap ¶
func (list MessageBatch) Swap(i int, j int)
type MessageQueue ¶
type MessageQueue struct { C <-chan struct{} // contains filtered or unexported fields }
func NewMessageQueue ¶
func NewMessageQueue() *MessageQueue
func (*MessageQueue) Flush ¶
func (q *MessageQueue) Flush() (batch MessageBatch)
func (*MessageQueue) Notify ¶
func (q *MessageQueue) Notify()
func (*MessageQueue) Push ¶
func (q *MessageQueue) Push(msg Message)
type Reader ¶
func NewMessageDecoder ¶
type Source ¶
func GetSources ¶
type SourceFunc ¶
func (SourceFunc) Open ¶
func (f SourceFunc) Open() (Reader, error)
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func (*Stream) Flush ¶
func (stream *Stream) Flush(limits StreamLimits, now time.Time) (list MessageBatch, reason string)
func (*Stream) HasExpired ¶
type StreamLimits ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.