logs

package
v1.0.0-alpha.8 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PoolingInterval = time.Second

PoolingInterval is the time between retries

View Source
var SeverityToLevel = map[string]int{
	"critical": 2,
	"error":    3,
	"warning":  4,
	"info":     6,
	"debug":    7,
}

SeverityToLevel map

Functions

func GetLevel

func GetLevel(severityOrLevel string) (int, error)

GetLevel to get level from severity or itself

func List

func List(filter *Filter, paths ...string)

List logs

func Watch

func Watch(watcher *Watcher)

Watch logs

Types

type Filter

type Filter struct {
	Level int    `json:"level,omitempty"`
	Since string `json:"start,omitempty"`
}

Filter structure

type Logs

type Logs struct {
	AppName    string `json:"appName"`
	InstanceID string `json:"instanceId"`
	Level      int    `json:"level"`
	Message    string `json:"message"`
	PodName    string `json:"podName"`
	Severity   string `json:"severity"`
	Timestamp  string `json:"timestamp"`
}

Logs structure

func GetList

func GetList(filter *Filter, paths ...string) []Logs

GetList logs

type Watcher

type Watcher struct {
	Filter          *Filter
	Paths           []string
	PoolingInterval time.Duration
	// contains filtered or unexported fields
}

Watcher structure

func (*Watcher) Start

func (w *Watcher) Start()

Start for Watcher

func (*Watcher) Stop

func (w *Watcher) Stop()

Stop for Watcher

Jump to

Keyboard shortcuts

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