feedinventory

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller is a controller that maintains FeedInventory objects

func NewController

func NewController(clusternetClient clusternetclientset.Interface,
	subsInformer appinformers.SubscriptionInformer,
	finvInformer appinformers.FeedInventoryInformer,
	manifestInformer appinformers.ManifestInformer,
	recorder record.EventRecorder, registry Registry,
	reservedNamespace string, customSyncHandlerFunc SyncHandlerFunc) (*Controller, error)

func (*Controller) Run

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

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

type PluginFactory

type PluginFactory interface {
	// Parser parses the raw data to get the replicas, resource requirements, replica jsonpath, etc.
	Parser(rawData []byte) (*int32, appsapi.ReplicaRequirements, string, error)
	// Name returns name of the plugin. It is used in logs, etc.
	Name() string
	// Kind returns the resource kind.
	Kind() string
}

PluginFactory is an interface that must be implemented for each plugin.

type Registry

Registry is a collection of all available workload parser.

func NewInTreeRegistry

func NewInTreeRegistry() Registry

NewInTreeRegistry builds the registry with all the in-tree plugins.

type SyncHandlerFunc added in v0.12.0

type SyncHandlerFunc func(subscription *appsapi.Subscription) error

SyncHandlerFunc is the function to sync a Subscription object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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