Documentation
¶
Index ¶
Constants ¶
View Source
const ( RUNNING = "running" WAITING = "waiting" TERMINATED = "terminated" )
Variables ¶
This section is empty.
Functions ¶
func Watch ¶
func Watch(ctx context.Context, i v1.PodInterface, podFilter *regexp.Regexp, containerFilter *regexp.Regexp, containerExcludeFilter *regexp.Regexp, initContainers bool, containerState ContainerState, labelSelector labels.Selector, timeoutSeconds int64, closed chan bool, restart chan bool) (chan *Target, chan *Target, error)
Types ¶
type Config ¶
type Config struct { KubeConfig string ContextName string ClusterName string Namespace string PodQuery *regexp.Regexp Timestamps bool ContainerQuery *regexp.Regexp ExcludeContainerQuery *regexp.Regexp ContainerState ContainerState Exclude []*regexp.Regexp Include []*regexp.Regexp InitContainers bool Since time.Duration AllNamespaces bool LabelSelector labels.Selector TailLines *int64 Template *template.Template GraylogServer string GraylogRetries int GraylogTransport string GraylogPort string GraylogCacerts string GraylogInsecure bool ClientTimeout int64 ClientQPS float32 ClientBurst int ExitAfter time.Duration }
Config contains the config for stern
type ContainerState ¶
type ContainerState []string
func NewContainerState ¶
func NewContainerState(stateConfig []string) (ContainerState, error)
func (ContainerState) Match ¶
func (stateConfig ContainerState) Match(containerState v1.ContainerState) bool
type Log ¶
type Log struct { // Message is the log message itself Message string `json:"message"` // Namespace of the pod Namespace string `json:"namespace"` // PodName of the pod PodName string `json:"podName"` // ContainerName of the container ContainerName string `json:"containerName"` // Name of the node the pod is running on NodeName string `json:"nodeName"` PodColor *color.Color `json:"-"` ContainerColor *color.Color `json:"-"` }
Log is the object which will be used together with the template to generate the output.
type Tail ¶
type Tail struct { Namespace string PodName string ContainerName string NodeName string Options *TailOptions Active bool // contains filtered or unexported fields }
Tail struct holds the data for tailing process
func NewTail ¶
func NewTail(namespace, podName, containerName string, nodeName string, tmpl *template.Template, options *TailOptions) *Tail
NewTail returns a new tail for a Kubernetes container inside a pod
func (*Tail) PrintClose ¶
func (t *Tail) PrintClose()
func (*Tail) PrintStreamNotReady ¶
type TailOptions ¶
type TailOptions struct { Timestamps bool SinceSeconds int64 Exclude []*regexp.Regexp Include []*regexp.Regexp Namespace bool TailLines *int64 ContextName string ClusterName string GraylogServer string GraylogRetries int GraylogTransport string GraylogPort string GraylogCacerts string GraylogInsecure bool }
TailOptions struct holds the options for tailing process
Click to show internal directories.
Click to hide internal directories.