async

package
v0.0.0-...-2d8c917 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package async provides an asynchronous appender for gol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Appender

type Appender struct {
	// contains filtered or unexported fields
}

Appender sends the logging event to all appenders asynchronously. It implements gol.Appender.

func NewAppender

func NewAppender(appenders ...gol.Appender) *Appender

NewAppender allocates and returns a new Appender. Start() must be called before writing data.

func NewAppenderWithBufSize

func NewAppenderWithBufSize(bufSize int, appenders ...gol.Appender) *Appender

NewAppenderWithBufSize returns an asynchronous appender with a buffer size of bufSize for each appender channel.

func (*Appender) Append

func (a *Appender) Append(e *gol.LoggingEvent)

Append sends the event to all appenders.

func (*Appender) Start

func (a *Appender) Start()

Start starts go routines for each writer.

func (*Appender) Stop

func (a *Appender) Stop()

Stop stops and waits until all go routines exited. Once Stop is called, this appender can not be started again.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL