fluent

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2014 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server    string
	Timeout   time.Duration
	RetryWait int
	MaxRetry  int
}

type Fluent

type Fluent struct {
	Config
	// contains filtered or unexported fields
}

func New

func New(config Config) (f *Fluent, err error)

New creates a new Logger.

func (*Fluent) Alive

func (f *Fluent) Alive() bool

func (*Fluent) Close

func (f *Fluent) Close() (err error)

Close closes the connection.

func (*Fluent) IsReconnecting

func (f *Fluent) IsReconnecting() bool

IsReconnecting return true if a reconnecting process in progress.

func (*Fluent) LastErrorString

func (f *Fluent) LastErrorString() string

func (*Fluent) Send

func (f *Fluent) Send(buffer []byte) (err error)

func (*Fluent) Shutdown

func (f *Fluent) Shutdown()

func (*Fluent) String

func (f *Fluent) String() string

type FluentRecord

type FluentRecord struct {
	Tag       string
	Timestamp int64
	Data      map[string]interface{}
}

func (FluentRecord) Pack

func (r FluentRecord) Pack() ([]byte, error)

type FluentRecordSet

type FluentRecordSet struct {
	Tag     string
	Records []FluentRecordType
}

func DecodeEntries

func DecodeEntries(conn net.Conn) ([]FluentRecordSet, error)

func (*FluentRecordSet) PackAsForward

func (rs *FluentRecordSet) PackAsForward() ([]byte, error)

func (*FluentRecordSet) PackAsPackedForward

func (rs *FluentRecordSet) PackAsPackedForward() ([]byte, error)

type FluentRecordType added in v0.0.2

type FluentRecordType interface {
	Pack() ([]byte, error)
	GetData(string) (interface{}, bool)
}

type TinyFluentMessage added in v0.0.2

type TinyFluentMessage struct {
	Timestamp int64
	FieldName string
	Message   []byte
}

func (*TinyFluentMessage) GetData added in v0.0.2

func (r *TinyFluentMessage) GetData(key string) (interface{}, bool)

func (*TinyFluentMessage) Pack added in v0.0.2

func (r *TinyFluentMessage) Pack() ([]byte, error)

type TinyFluentRecord

type TinyFluentRecord struct {
	Timestamp int64
	Data      map[string]interface{}
}

func (*TinyFluentRecord) GetData added in v0.0.2

func (r *TinyFluentRecord) GetData(key string) (interface{}, bool)

func (*TinyFluentRecord) Pack

func (r *TinyFluentRecord) Pack() ([]byte, error)

Jump to

Keyboard shortcuts

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