logentries

package
v0.0.0-...-c2832fb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEvents

func NewEvents(body []byte) ([]*cypress.Message, error)

func NewLogger

func NewLogger(address string, ssl bool, token string) *tcplog.Logger

Types

type EventsOptions

type EventsOptions struct {
	Start  int    `url:"start,omitempty"`
	End    int    `url:"end,omitempty"`
	Filter string `url:"filter,omitempty"`
	Limit  int    `url:"limit,omitempty"`
}

type EventsResponse

type EventsResponse struct {
	Response string `json:"response"`
	Reason   string `json:"reason"`
	Events   []*cypress.Message
}

type LogentriesFormatter

type LogentriesFormatter struct {
	Token string
}

func (*LogentriesFormatter) Format

func (lf *LogentriesFormatter) Format(m *cypress.Message) ([]byte, error)

type LogentriesRecv

type LogentriesRecv struct {
	*http.Client
	RootURL     string
	Options     *EventsOptions
	EventBuffer chan *cypress.Message
}

func NewLogentriesRecv

func NewLogentriesRecv(key, host, log string, options *EventsOptions, bufferSize int) (*LogentriesRecv, error)

func (*LogentriesRecv) BufferEvents

func (lr *LogentriesRecv) BufferEvents(events []*cypress.Message) error

func (*LogentriesRecv) Close

func (lr *LogentriesRecv) Close() error

func (*LogentriesRecv) EncodeURL

func (lr *LogentriesRecv) EncodeURL(o *EventsOptions) string

func (*LogentriesRecv) Generate

func (lr *LogentriesRecv) Generate() (*cypress.Message, error)

func (*LogentriesRecv) GetBody

func (lr *LogentriesRecv) GetBody(url string) ([]byte, error)

func (*LogentriesRecv) Search

func (lr *LogentriesRecv) Search(o *EventsOptions) ([]*cypress.Message, error)

func (*LogentriesRecv) SetDefaultOptions

func (lr *LogentriesRecv) SetDefaultOptions(o *EventsOptions) *EventsOptions

type Plugin

type Plugin struct {
	Host  string
	Ssl   bool
	Token string

	Key string
	Log string

	Start      int
	End        int
	Filter     string
	Limit      int
	BufferSize int
}

func (*Plugin) Generator

func (p *Plugin) Generator() (cypress.Generator, error)

func (*Plugin) Receiver

func (p *Plugin) Receiver() (cypress.Receiver, error)

type Recv

type Recv struct {
	Key  string `short:"k" long:"key" description:"Logentries token"`
	Host string `short:"h" long:"host" description:"Logentries host name"`
	Log  string `short:"l" long:"log" description:"Logentries log name"`

	Start  int    `` /* 194-byte string literal not displayed */
	End    int    `` /* 190-byte string literal not displayed */
	Filter string `long:"filter" description:"Filtering pattern. It is a keyword or a regular expression prepended with slash (/)."`
	Limit  int    `long:"limit" default:"100" description:"Maximal number of events downloaded."`

	BufferSize int `long:"buffersize" default:"100"`
}

func (*Recv) Execute

func (g *Recv) Execute(args []string) error

type Send

type Send struct {
	Host  string `short:"H" long:"host" default:"data.logentries.com:2000" description:"Logentries host <host>:<port>"`
	Ssl   bool   `short:"S" long:"tls" description:"Use TLS"`
	Token string `short:"T" long:"token" description:"Logentries token that uniquely identifies the destination log"`
}

func (*Send) Execute

func (p *Send) Execute(args []string) error

Jump to

Keyboard shortcuts

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