fluent

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2017 License: Apache-2.0, Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnableEventTime = false
)
View Source
var Rand = rand.New(rand.NewSource(time.Now().UnixNano()))

Functions

This section is empty.

Types

type Config

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

type EventTimeExtension added in v0.2.0

type EventTimeExtension struct{}

func (*EventTimeExtension) ReadExt added in v0.2.0

func (e *EventTimeExtension) ReadExt(dst interface{}, src []byte)

func (*EventTimeExtension) WriteExt added in v0.2.0

func (e *EventTimeExtension) WriteExt(v interface{}) []byte

type Fluent

type Fluent struct {
	Config

	Sent int64
	// 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) RefreshConnection added in v0.1.3

func (f *Fluent) RefreshConnection() error

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 time.Time
	Data      map[string]interface{}
}

func (*FluentRecord) GetAllData added in v0.0.9

func (r *FluentRecord) GetAllData() map[string]interface{}

func (*FluentRecord) GetData added in v0.0.9

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

func (FluentRecord) Pack

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

func (*FluentRecord) String added in v0.0.9

func (r *FluentRecord) String() string

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)
	GetAllData() map[string]interface{}
	String() string
}

type TinyFluentMessage added in v0.0.2

type TinyFluentMessage struct {
	Timestamp time.Time
	FieldName string
	Message   []byte
}

func (*TinyFluentMessage) GetAllData added in v0.0.9

func (r *TinyFluentMessage) GetAllData() map[string]interface{}

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)

func (*TinyFluentMessage) String added in v0.0.9

func (r *TinyFluentMessage) String() string

type TinyFluentRecord

type TinyFluentRecord struct {
	Timestamp time.Time
	Data      map[string]interface{}
}

func (*TinyFluentRecord) GetAllData added in v0.0.9

func (r *TinyFluentRecord) GetAllData() 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)

func (*TinyFluentRecord) String added in v0.0.9

func (r *TinyFluentRecord) String() string

Jump to

Keyboard shortcuts

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