ktail

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2018 License: MIT, MIT Imports: 15 Imported by: 0

README

Copied from https://github.com/atombender/ktail so that I could link it.

The existing files are all in the 'main' package in the original repo.

Modifications:

  • Package name (s/main/ktail/)
  • Change the Kubernetes v1 package import

Please see LICENSE for licensing details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callbacks

type Callbacks struct {
	OnEvent LogEventFunc
	OnEnter ContainerEnterFunc
	OnExit  ContainerExitFunc
	OnError ContainerErrorFunc
}

type ContainerEnterFunc

type ContainerEnterFunc func(pod *v1.Pod, container *v1.Container) bool

type ContainerErrorFunc

type ContainerErrorFunc func(pod *v1.Pod, container *v1.Container, err error)

type ContainerExitFunc

type ContainerExitFunc func(pod *v1.Pod, container *v1.Container)

type ContainerTailer

type ContainerTailer struct {
	// contains filtered or unexported fields
}

func NewContainerTailer

func NewContainerTailer(
	clientset *kubernetes.Clientset,
	pod v1.Pod,
	container v1.Container,
	eventFunc LogEventFunc,
	newlyCreatedPod bool) *ContainerTailer

func (*ContainerTailer) Run

func (ct *ContainerTailer) Run() error

func (*ContainerTailer) Stop

func (ct *ContainerTailer) Stop()

type Controller

type Controller struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewController

func NewController(
	clientset *kubernetes.Clientset,
	namespace string,
	labelSelector labels.Selector,
	callbacks Callbacks) *Controller

func (*Controller) Run

func (ctl *Controller) Run()

type LogEvent

type LogEvent struct {
	Pod       *v1.Pod
	Container *v1.Container
	Timestamp *time.Time
	Message   string
}

type LogEventFunc

type LogEventFunc func(LogEvent)

Jump to

Keyboard shortcuts

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