{"modulePath":"github.com/openshift/machine-api-operator","version":"v0.1.0","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package common\n\nPackage common defines the types and functions that are shared by multiple commands in the cmd package.\n\n## Constants\n\n```go\nconst (\n\t// LeaseDuration is the default duration for the leader election lease.\n\tLeaseDuration = 90 * time.Second\n\t// RenewDeadline is the default duration for the leader renewal.\n\tRenewDeadline = 60 * time.Second\n\t// RetryPeriod is the default duration for the leader electrion retrial.\n\tRetryPeriod = 30 * time.Second\n)\n```\n\n## Functions\n\n```go\nfunc CreateResourceLock(cb *ClientBuilder, componentNamespace, componentName string) resourcelock.Interface\n```\nCreateResourceLock returns an interface for the resource lock.\n\n## Types\n\n```go\ntype ClientBuilder struct {\n\t// contains filtered or unexported fields\n}\n```\nClientBuilder can create a variety of kubernetes client interface with its embeded rest.Config.\n\n```go\nfunc NewClientBuilder(kubeconfig string) (*ClientBuilder, error)\n```\nNewClientBuilder returns a \\*ClientBuilder with the given kubeconfig.\n\n```go\nfunc (cb *ClientBuilder) APIExtClientOrDie(name string) apiext.Interface\n```\nAPIExtClientOrDie returns the kubernetes client interface for extended kubernetes objects.\n\n```go\nfunc (cb *ClientBuilder) APIRegistrationClientOrDie(name string) apiregistrationclientset.Interface\n```\nAPIRegistrationClientOrDie returns the kubernetes client interface for machine config.\n\n```go\nfunc (cb *ClientBuilder) ClusterAPIClientOrDie(name string) clusterapiclientset.Interface\n```\nClusterAPIClientOrDie returns the kubernetes client interface for machine config.\n\n```go\nfunc (cb *ClientBuilder) ClusterversionClientOrDie(name string) cvoclientset.Interface\n```\nClusterversionClientOrDie returns the kubernetes client interface for cluster version objects. TODO(yifan): Just return the client for the Operator Status objects.\n\n```go\nfunc (cb *ClientBuilder) KubeClientOrDie(name string) kubernetes.Interface\n```\nKubeClientOrDie returns the kubernetes client interface for general kubernetes objects.\n\n```go\ntype ControllerContext struct {\n\tClientBuilder *ClientBuilder\n\n\tCAPINamespacedInformerFactory clusterapiinformers.SharedInformerFactory\n\tKubeInformerFactory           informers.SharedInformerFactory\n\tKubeNamespacedInformerFactory informers.SharedInformerFactory\n\tAPIExtInformerFactory         apiextinformers.SharedInformerFactory\n\n\tAvailableResources map[schema.GroupVersionResource]bool\n\n\tStop \u003c-chan struct{}\n\n\tInformersStarted chan struct{}\n\n\tKubeInformersStarted chan struct{}\n\n\tResyncPeriod func() time.Duration\n}\n```\nControllerContext stores all the informers for a variety of kubernetes objects.\n\n```go\nfunc CreateControllerContext(cb *ClientBuilder, stop \u003c-chan struct{}, targetNamespace string) *ControllerContext\n```\nCreateControllerContext creates the ControllerContext with the ClientBuilder.\n\n","path":"github.com/openshift/machine-api-operator/cmd/common","name":"common","synopsis":"Package common defines the types and functions that are shared by multiple commands in the cmd package.","isRedistributable":true}
