Documentation ¶
Index ¶
- func NewCypressMessage(event *Event) (*cypress.Message, error)
- func NewLogger(address string, ssl bool) *tcplog.Logger
- type Event
- type EventsOptions
- type EventsResponse
- type PapertrailFormatter
- type PapertrailRecv
- func (pr *PapertrailRecv) BufferEvents(events []*Event) error
- func (pr *PapertrailRecv) Close() error
- func (pr *PapertrailRecv) EncodeURL(o *EventsOptions) string
- func (pr *PapertrailRecv) Generate() (*cypress.Message, error)
- func (pr *PapertrailRecv) GetBody(url string) ([]byte, error)
- func (pr *PapertrailRecv) Search(o *EventsOptions) ([]*Event, error)
- func (pr *PapertrailRecv) SetDefaultOptions(o *EventsOptions) *EventsOptions
- type Plugin
- type Recv
- type Send
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct { Id string `json:"id'` ReceivedAt string `json:"received_at"` DisplayReceivedAt string `json:"display_received_at"` SourceName string `json:"source_name"` SourceId uint32 `json:"source_id"` SourceIp string `json:"source_ip"` Facility string `json:"facility"` Severity string `json:"severity"` Program string `json:"program"` Message string `json:"message"` }
type EventsOptions ¶
type EventsOptions struct { Q string `url:"q,omitempty"` GroupId string `url:"group_id,omitempty"` SystemId string `url:"system_id,omitempty"` MinId string `url:"min_id,omitempty"` MaxId string `url:"max_id,omitempty"` MinTime string `url:"min_time,omitempty"` MaxTime string `url:"max_time,omitempty"` Tail bool `url:"tail,omitempty"` }
type EventsResponse ¶
type PapertrailFormatter ¶
type PapertrailFormatter struct{}
type PapertrailRecv ¶
type PapertrailRecv struct { *http.Client Token string Options *EventsOptions EventBuffer chan *Event }
func NewPapertrailRecv ¶
func NewPapertrailRecv(token string, options *EventsOptions, bufferSize int) *PapertrailRecv
func (*PapertrailRecv) BufferEvents ¶
func (pr *PapertrailRecv) BufferEvents(events []*Event) error
func (*PapertrailRecv) Close ¶
func (pr *PapertrailRecv) Close() error
func (*PapertrailRecv) EncodeURL ¶
func (pr *PapertrailRecv) EncodeURL(o *EventsOptions) string
func (*PapertrailRecv) Search ¶
func (pr *PapertrailRecv) Search(o *EventsOptions) ([]*Event, error)
func (*PapertrailRecv) SetDefaultOptions ¶
func (pr *PapertrailRecv) SetDefaultOptions(o *EventsOptions) *EventsOptions
type Plugin ¶
type Recv ¶
type Recv struct { Token string `short:"T" long:"token" description:"Papertrail token"` Q string `short:"q" long:"query" description:"Papertrail search query"` GroupId string `long:"groupid" description:"Limit results to specific Papertrail group"` SystemId string `long:"systemid" description:"Limit results to specific Papertrail system"` MinId string `long:"minid" description:"The oldest Papertrail message ID to examine"` MaxId string `long:"maxid" description:"The newest Papertrail message ID to examine"` MinTime string `long:"mintime" description:"The oldest Papertrail timestamp to examine"` MaxTime string `long:"maxtime" description:"The newest Papertrail timestamp to examine"` Tail bool `long:"tail" default:"false" description:"Set to true to search newest to oldest"` BufferSize int `long:"buffersize" default:"100"` }
Click to show internal directories.
Click to hide internal directories.