core

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	ID        string    `json:"id"`
	Host      string    `json:"host"`
	Container string    `json:"container"`
	Pid       int       `json:"pid"`
	Msg       string    `json:"msg"`
	TS        time.Time `json:"ts"`
	CreatedTS time.Time `json:"cts"`
}

LogEntry represents a single event for forwarder and rest server and client

func NewEntry

func NewEntry(line string, tz *time.Location) (entry LogEntry, err error)

NewEntry makes the LogEntry from a log line. example: "Oct 19 15:29:43 host-1 docker/mongo[888]: 2015-10-19T19:29:43 blah blah blah"

func (LogEntry) String

func (entry LogEntry) String() string

type Request

type Request struct {
	LastID     string    `json:"id"`
	Limit      int       `json:"max"`                  // max size of response, i.e. number of messages one request can return
	Hosts      []string  `json:"hosts,omitempty"`      // list of hosts, can be exact match or regex in from of /regex/
	Containers []string  `json:"containers,omitempty"` // list of containers, can be regex as well
	Excludes   []string  `json:"excludes,omitempty"`   // list of excluded containers, can be regex
	FromTS     time.Time `json:"from_ts,omitempty"`
	ToTS       time.Time `json:"to_ts,omitempty"`
}

Request with filters and params for store queries Every filter is optional. If not defined means "any"

func (Request) String

func (r Request) String() string

Jump to

Keyboard shortcuts

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