Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
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 ¶
func NewScheduledImageStreamController(namespacer client.ImageStreamsNamespacer, informer shared.ImageStreamInformer, opts ScheduledImageStreamControllerOptions) *ScheduledImageStreamController
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 ¶
func (opts ScheduledImageStreamControllerOptions) Buckets() int
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 ¶
func (opts ScheduledImageStreamControllerOptions) GetRateLimiter() flowcontrol.RateLimiter
GetRateLimiter returns a flowcontrol rate limiter based on the maximum number of imports (MaxImageImportsPerMinute) setting.