support

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package support is a library of code useful to any strategy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPodWatch added in v0.5.3

func NewPodWatch(client kclient.Interface, namespace, name, resourceVersion string) func() *kapi.Pod

NewPodWatch creates a pod watching function which is backed by a FIFO/reflector pair. This avoids managing watches directly.

Types

type HookExecutor

type HookExecutor struct {
	// PodClient provides access to pods.
	PodClient HookExecutorPodClient
}

HookExecutor executes a deployment lifecycle hook.

func (*HookExecutor) Execute

func (e *HookExecutor) Execute(hook *deployapi.LifecycleHook, deployment *kapi.ReplicationController, retryPeriod time.Duration) error

Execute executes hook in the context of deployment.

type HookExecutorPodClient

type HookExecutorPodClient interface {
	CreatePod(namespace string, pod *kapi.Pod) (*kapi.Pod, error)
	PodWatch(namespace, name, resourceVersion string) func() *kapi.Pod
}

HookExecutorPodClient abstracts access to pods.

type HookExecutorPodClientImpl

type HookExecutorPodClientImpl struct {
	CreatePodFunc func(namespace string, pod *kapi.Pod) (*kapi.Pod, error)
	PodWatchFunc  func(namespace, name, resourceVersion string) func() *kapi.Pod
}

HookExecutorPodClientImpl is a pluggable HookExecutorPodClient.

func (*HookExecutorPodClientImpl) CreatePod

func (i *HookExecutorPodClientImpl) CreatePod(namespace string, pod *kapi.Pod) (*kapi.Pod, error)

func (*HookExecutorPodClientImpl) PodWatch added in v0.5.3

func (i *HookExecutorPodClientImpl) PodWatch(namespace, name, resourceVersion string) func() *kapi.Pod

Jump to

Keyboard shortcuts

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