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

controller

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildController

type BuildController struct {
	BuildUpdater      buildclient.BuildUpdater
	PodManager        podManager
	BuildStrategy     BuildStrategy
	ImageStreamClient imageStreamClient
	Recorder          record.EventRecorder
}

BuildController watches build resources and manages their state

func (*BuildController) HandleBuild

func (bc *BuildController) HandleBuild(build *buildapi.Build) error

HandleBuild takes new builds and puts them in the pending state after creating a corresponding pod

type BuildDeleteController

type BuildDeleteController struct {
	PodManager podManager
}

BuildDeleteController watches for builds being deleted and cleans up associated pods

func (*BuildDeleteController) HandleBuildDeletion

func (bc *BuildDeleteController) HandleBuildDeletion(build *buildapi.Build) error

HandleBuildDeletion deletes a build pod if the corresponding build has been deleted

type BuildPodController

type BuildPodController struct {
	BuildStore   cache.Store
	BuildUpdater buildclient.BuildUpdater
	PodManager   podManager
}

BuildPodController watches pods running builds and manages the build state

func (*BuildPodController) CancelBuild

func (bc *BuildPodController) CancelBuild(build *buildapi.Build, pod *kapi.Pod) error

CancelBuild updates a build status to Cancelled, after its associated pod is deleted.

func (*BuildPodController) HandlePod

func (bc *BuildPodController) HandlePod(pod *kapi.Pod) error

HandlePod updates the state of the build based on the pod state

type BuildPodDeleteController

type BuildPodDeleteController struct {
	BuildStore   cache.Store
	BuildUpdater buildclient.BuildUpdater
}

BuildPodDeleteController watches pods running builds and updates the build if the pod is deleted

func (*BuildPodDeleteController) HandleBuildPodDeletion

func (bc *BuildPodDeleteController) HandleBuildPodDeletion(pod *kapi.Pod) error

HandleBuildPodDeletion sets the status of a build to error if the build pod has been deleted

type BuildStrategy

type BuildStrategy interface {
	CreateBuildPod(build *buildapi.Build) (*kapi.Pod, error)
}

BuildStrategy knows how to create a pod spec for a pod which can execute a build.

type ImageChangeController

type ImageChangeController struct {
	BuildConfigStore        cache.Store
	BuildConfigInstantiator buildclient.BuildConfigInstantiator
	// Stop is an optional channel that controls when the controller exits
	Stop <-chan struct{}
}

ImageChangeController watches for changes to ImageRepositories and triggers builds when a new version of a tag referenced by a BuildConfig is available.

func (*ImageChangeController) HandleImageRepo

func (c *ImageChangeController) HandleImageRepo(repo *imageapi.ImageStream) error

HandleImageRepo processes the next ImageStream event.

type ImageChangeControllerFatalError

type ImageChangeControllerFatalError struct {
	Reason string
	Err    error
}

ImageChangeControllerFatalError represents a fatal error while handling an image change

func (ImageChangeControllerFatalError) Error

Source Files

  • controller.go
  • image_change_controller.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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