controller

package
v0.0.0-...-388587c Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: BSD-3-Clause Imports: 30 Imported by: 0

Documentation

Overview

Package controller provides the Kubernetes Pod logging controllers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller represents a tail Kubernetes resource logs.

Implements a reconcile.Reconciler.

func New

func New(ioStreams stdio.Streams, mgr manager.Manager, opts *options.Options) (c *Controller, err error)

New returns the new Controller registered with the manager.Manager.

func (*Controller) Close

func (c *Controller) Close()

Close closes the goroutine pool.

func (*Controller) ReadStream

func (c *Controller) ReadStream(v interface{})

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, req reconcile.Request) (result reconcile.Result, err error)

Reconcile implements a ctrlreconcile.Reconciler.

func (*Controller) SetupWithManager

func (c *Controller) SetupWithManager(mgr manager.Manager) (err error)

SetupWithManager setups the Controller with manager.Manager.

type LogEvent

type LogEvent struct {
	// Message is the log message itself
	Message string `json:"message"`

	// PodName of the pod
	PodName string `json:"podName"`

	// ContainerName of the container
	ContainerName string `json:"containerName"`

	// Namespace of the pod
	Namespace string `json:"namespace"`

	// Timestamp of the pod
	Timestamp *time.Time `json:"timestamp,omitempty"`

	PodColor       *color.Color `json:"-"`
	ContainerColor *color.Color `json:"-"`
}

LogEvent represents a Pod log event.

type PredicateEventFilter

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

PredicateEventFilter filters events before they are provided to handler.EventHandlers.

func (*PredicateEventFilter) Create

Create implements predicate.Predicate.

func (*PredicateEventFilter) Delete

Delete implements predicate.Predicate.

func (*PredicateEventFilter) Generic

func (e *PredicateEventFilter) Generic(event ctrlevent.GenericEvent) bool

Generic implements predicate.Predicate.

func (*PredicateEventFilter) Update

Update implements predicate.Predicate.

Jump to

Keyboard shortcuts

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