{"modulePath":"github.com/openshift/cloud-network-config-controller","version":"v0.0.0-20261029170518-e4d8b92203f4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package controller\n\n## Constants\n\n```go\nconst (\n\n\t// ClientTimeout specifies the timeout for our calls to the API server for\n\t// all client operations\n\tClientTimeout = 30 * time.Second\n\n\t// APIResponseSoftLimit specifies the time after which a Warning gets logged if\n\t// response from API is not received before that time\n\tAPIResponseSoftLimit = 2 * time.Second\n)\n```\n\n## Types\n\n```go\ntype CloudNetworkConfigController struct {\n\t// CloudNetworkConfigController implements the generic interface: which\n\t// allows all derived controllers an abstraction from the \"bricks and pipes\"\n\t// of the controller framework, allowing them to implement only their\n\t// specific control loop functionality and not bother with the rest.\n\tCloudNetworkConfigControllerIntf\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCloudNetworkConfigController(\n\tsyncs []cache.InformerSynced,\n\tresourceController CloudNetworkConfigControllerIntf,\n\tresourceControllerKey string,\n\tresourceControllerType reflect.Type) *CloudNetworkConfigController\n```\n\n```go\nfunc (c *CloudNetworkConfigController) Enqueue(obj interface{})\n```\nEnqueue takes a resource object and converts it into a name/namespace or name string which is then put onto the work queue. This method \\_\\_should\\_\\_ not be passed resources of any type other than the dedicated controller object.\n\n```go\nfunc (c *CloudNetworkConfigController) Run(stopCh \u003c-chan struct{}) error\n```\nRun 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.\n\n```go\ntype CloudNetworkConfigControllerIntf interface {\n\tSyncHandler(key string) error\n\t// InitialSync is called once after informer caches are synced but before workers start.\n\t// Use this for one-time cleanup or initialization that requires access to the full\n\t// state of the cluster (e.g., listing all existing resources).\n\tInitialSync() error\n}\n```\n\n","path":"github.com/openshift/cloud-network-config-controller/pkg/controller","name":"controller","synopsis":"","isRedistributable":true}
