log

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func App

func App(ctx context.Context, app *apiv1.App, output chan<- Message, options *Options) error

func Container

func Container(ctx context.Context, pod *corev1.Pod, name string, output chan<- Message, options *Options) (err error)

func Output

func Output(ctx context.Context, c client.Client, name string, opts *client.LogOptions) error

func Pod

func Pod(ctx context.Context, pod *corev1.Pod, output chan<- Message, options *Options) error

func SinceLogCheck

func SinceLogCheck(since string, msg v1.LogMessage) (bool, error)

Types

type DefaultLoggerImpl added in v0.9.0

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

func NewDefaultLogger added in v0.9.0

func NewDefaultLogger(ctx context.Context, c client.Client) *DefaultLoggerImpl

func (*DefaultLoggerImpl) AppStatus added in v0.9.0

func (d *DefaultLoggerImpl) AppStatus(ready bool, msg string, app *apiv1.App)

func (*DefaultLoggerImpl) Container added in v0.9.0

func (d *DefaultLoggerImpl) Container(timeStamp metav1.Time, containerName, line string)

func (*DefaultLoggerImpl) Errorf added in v0.9.0

func (d *DefaultLoggerImpl) Errorf(format string, args ...interface{})

func (*DefaultLoggerImpl) Infof added in v0.9.0

func (d *DefaultLoggerImpl) Infof(format string, args ...interface{})

type Message

type Message struct {
	Line          string
	Pod           *corev1.Pod
	ContainerName string
	Time          time.Time

	Err error
}

type Options

type Options struct {
	RestConfig       *rest.Config
	Client           client.WithWatch
	PodClient        v12.PodsGetter
	Tail             *int64
	Follow           bool
	ContainerReplica string
	Container        string
}

func (*Options) Complete

func (o *Options) Complete() (*Options, error)

Jump to

Keyboard shortcuts

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