kail

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: MIT Imports: 19 Imported by: 0

README

kail: kubernetes tail Build Status

Kubernetes tail. Streams logs from all containers of all matched pods.

# view logs from all pods
$ kail

# all pods named 'x'
$ kail --pod x

# pod named 'y' in namespace 'x'
$ kail --pod x/y

# all pods in namespace 'x' or 'y'
$ kail --ns x --ns y

# pods matching service 'x'
$ kail --svc x

# pods controled by replication controller 'x'
$ kail --rc x

# pods controled by replica set 'x'
$ kail --rc x

# pods on node 'x'
$ kail --node x

# pod with labels 'x=y' and 'a=b'
$ kail --label x=y --label a=b

# pods controlled by replica set 'x', targeted by service 'y', on node 'z'
$ kail --rs x --svc y --node z

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	Events() <-chan Event
	Stop()
	Done() <-chan struct{}
}

func NewController

func NewController(ctx context.Context, cs kubernetes.Interface, pcontroller pod.Controller) (Controller, error)

type DS

type DS interface {
	Pods() pod.Controller
	Ready() <-chan struct{}
	Done() <-chan struct{}
	Shutdown()
}

type DSBuilder

type DSBuilder interface {
	WithNamespace(name ...string) DSBuilder
	WithPods(id ...nsname.NSName) DSBuilder
	WithLabels(labels map[string]string) DSBuilder
	WithService(id ...nsname.NSName) DSBuilder
	WithNode(name ...string) DSBuilder
	WithRC(id ...nsname.NSName) DSBuilder
	WithRS(id ...nsname.NSName) DSBuilder

	Create(ctx context.Context, cs kubernetes.Interface) (DS, error)
}

func NewDSBuilder

func NewDSBuilder() DSBuilder

type Event

type Event interface {
	Source() EventSource
	Log() string
}

type EventSource

type EventSource interface {
	Namespace() string
	Name() string
	Container() string
	Node() string
}

type Writer

type Writer interface {
	Print(event Event) error
	Fprint(w io.Writer, event Event) error
}

func NewWriter

func NewWriter(out io.Writer) Writer

Directories

Path Synopsis
cmd
kail command

Jump to

Keyboard shortcuts

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