kubernetes

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWatcherClosed = errors.New("channel closed")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() (*Client, error)

func (*Client) GetLogs

func (c *Client) GetLogs(podName, namespace string) (string, error)

func (*Client) WatchPods

func (c *Client) WatchPods(ctx context.Context, succeeded, failed NotifyFunc) error

type Container

type Container struct {
	Name         string `json:"name"`
	State        string `json:"state"`
	Reason       string `json:"reason"`
	Message      string `json:"message"`
	Ready        bool   `json:"ready"`
	RestartCount int32  `json:"restartCount"`
}

type Log added in v0.0.5

type Log struct {
	Level   string
	Message string
}

type NotifyFunc

type NotifyFunc = func(event *PodEvent) error

NotifyFunc represents callback function for Pod event

type PodEvent

type PodEvent struct {
	Namespace  string      `json:"namespace"`
	Name       string      `json:"name"`
	State      string      `json:"state"`
	Reason     string      `json:"reason"`
	Message    string      `json:"message"`
	Containers []Container `json:"containers"`
	ArtifactID string      `json:"artifactId"`
}

PodEvent represents Pod termination event

Jump to

Keyboard shortcuts

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