Help us shape the future of Go! Take the 2026 Go Developer Survey

pods

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStream

func NewStream(pods typedv1.PodInterface, name string, opts *corev1.PodLogOptions) stream.Streamer

func ParsePodTemplate added in v0.12.0

func ParsePodTemplate(httpClient http.Client, podTemplateLocation string, validate file.TypeValidator, errorMsg error) (v1beta1.PodTemplate, error)

Types

type Container

type Container struct {
	NewStreamer stream.NewStreamerFunc
	// contains filtered or unexported fields
}

func (*Container) LogReader

func (c *Container) LogReader(follow bool) *LogReader

func (*Container) Status

func (c *Container) Status() error

type Log

type Log struct {
	PodName       string
	ContainerName string
	Log           string
}

Log represents one log message from a pod

type LogReader

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

func (*LogReader) Read

func (lr *LogReader) Read() (<-chan Log, <-chan error, error)

type Pod

type Pod struct {
	Name     string
	Ns       string
	Kc       k8s.Interface
	Streamer stream.NewStreamerFunc
}

func New

func New(name, ns string, client k8s.Interface, streamer stream.NewStreamerFunc) *Pod

func NewWithDefaults

func NewWithDefaults(name, ns string, client k8s.Interface) *Pod

func (*Pod) Container

func (p *Pod) Container(c string) *Container

Container returns the an instance of Container

func (*Pod) Get

func (p *Pod) Get() (*corev1.Pod, error)

Get gets the pod

func (*Pod) Stream

func (p *Pod) Stream(opt *corev1.PodLogOptions) (io.ReadCloser, error)

Stream returns the stream object for given container and mode in order to fetch the logs

func (*Pod) Wait

func (p *Pod) Wait() (*corev1.Pod, error)

Wait wait for the pod to get up and running

type Stream

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

func (*Stream) Stream

func (s *Stream) Stream() (io.ReadCloser, error)

Stream Creates a stream object which allows reading the logs

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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