Versions in this module Expand all Collapse all v0 v0.2.0 Sep 25, 2017 Changes in this version + 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 interface + Close func(group string, stream string) + Open func(group string, stream string) (Writer, error) + func GetDestination(name string) (destination Destination) + func GetDestinations(names ...string) (destinations []Destination) + type DestinationFunc func(group string, stream string) (Writer, error) + func (f DestinationFunc) Close(group string, stream string) + func (f DestinationFunc) Open(group string, stream string) (Writer, error) + type ErrorList []error + func (err ErrorList) Error() string + type Group struct + func NewGroup(name string, now time.Time) *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 struct + Group string + Hostname string + Queue *MessageQueue + Stream string + func (h *LogHandler) HandleLog(entry *log.Entry) (err error) + type LogLevel log.Level + func (lvl *LogLevel) Set(s string) error + func (lvl LogLevel) Get() interface{} + func (lvl LogLevel) String() string + type Message struct + Event ecslogs.Event + Group string + Stream string + func (m Message) Bytes() []byte + func (m Message) ContentLength() int + func (m Message) String() string + type MessageBatch []Message + func (list MessageBatch) Len() int + func (list MessageBatch) Less(i int, j int) bool + func (list MessageBatch) Swap(i int, j int) + type MessageQueue struct + C <-chan struct{} + func NewMessageQueue() *MessageQueue + func (q *MessageQueue) Flush() (batch MessageBatch) + func (q *MessageQueue) Notify() + func (q *MessageQueue) Push(msg Message) + type Reader interface + ReadMessage func() (Message, error) + func NewMessageDecoder(r io.Reader) Reader + type Source interface + Open func() (Reader, error) + func GetSource(name string) (source Source) + func GetSources(names ...string) (sources []Source) + type SourceFunc func() (Reader, error) + func (f SourceFunc) Open() (Reader, error) + type Store struct + func NewStore() *Store + func (store *Store) Add(msg Message, now time.Time) (group *Group, stream *Stream) + func (store *Store) ForEach(f func(*Group)) + func (store *Store) RemoveExpired(timeout time.Duration, now time.Time) (streams []*Stream) + type Stream struct + func NewStream(group string, name string, now time.Time) *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 struct + Force bool + MaxBytes int + MaxCount int + MaxTime time.Duration + type Writer interface + WriteMessage func(Message) error + WriteMessageBatch func(MessageBatch) error + func NewMessageEncoder(w io.Writer) Writer