controller

package
v3.6.0-alpha.2+incompa... Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImportable = errors.New("requested image cannot be imported")

Functions

This section is empty.

Types

type ImageStreamController

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

func NewImageStreamController

func NewImageStreamController(namespacer client.ImageStreamsNamespacer, informer shared.ImageStreamInformer) *ImageStreamController

NewImageStreamController returns a new image stream import controller.

func (*ImageStreamController) Run

func (c *ImageStreamController) Run(workers int, stopCh <-chan struct{})

Run begins watching and syncing.

func (*ImageStreamController) SetNotifier

func (c *ImageStreamController) SetNotifier(n Notifier)

type Notifier added in v1.1.2

type Notifier interface {
	// Importing is invoked when the controller is going to import an image stream
	Importing(stream *api.ImageStream)
}

Notifier provides information about when the controller makes a decision

type ScheduledImageStreamController

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

func NewScheduledImageStreamController

NewScheduledImageStreamController returns a new scheduled image stream import controller.

func (*ScheduledImageStreamController) Importing

func (s *ScheduledImageStreamController) Importing(stream *api.ImageStream)

Importing is invoked when the controller decides to import a stream in order to push back the next schedule time.

func (*ScheduledImageStreamController) Run

func (s *ScheduledImageStreamController) Run(stopCh <-chan struct{})

Run begins watching and syncing.

type ScheduledImageStreamControllerOptions

type ScheduledImageStreamControllerOptions struct {
	Resync time.Duration

	// Enabled indicates that the scheduled imports for images are allowed.
	Enabled bool

	// DefaultBucketSize is the default bucket size used by QPS.
	DefaultBucketSize int

	// MaxImageImportsPerMinute sets the maximum number of simultaneous image imports per
	// minute.
	MaxImageImportsPerMinute int
}

ImageStreamControllerOptions represents a configuration for the scheduled image stream import controller.

func (ScheduledImageStreamControllerOptions) Buckets

Buckets returns the bucket size calculated based on the resync interval of the scheduled image import controller. For resync interval bigger than our the bucket size is doubled, for resync lower then 10 minutes bucket size is set to a half of the default size.

func (ScheduledImageStreamControllerOptions) BucketsToQPS

func (opts ScheduledImageStreamControllerOptions) BucketsToQPS() float32

BucketsToQPS converts the bucket size to QPS

func (ScheduledImageStreamControllerOptions) GetRateLimiter

GetRateLimiter returns a flowcontrol rate limiter based on the maximum number of imports (MaxImageImportsPerMinute) setting.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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