{"modulePath":"github.com/fluid-cloudnative/fluid","version":"v1.0.8","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ctrl\n\n## Functions\n\n```go\nfunc GetWorkersAsStatefulset(client client.Client, key types.NamespacedName) (workers *appsv1.StatefulSet, err error)\n```\nGetWorkersAsStatefulset gets workers as statefulset object. if it returns deprecated errors, it indicates that not support anymore.\n\n## Types\n\n```go\ntype Helper struct {\n\t// contains filtered or unexported fields\n}\n```\nThe common part of the engine which can be reused\n\n```go\nfunc BuildHelper(runtimeInfo base.RuntimeInfoInterface, client client.Client, log logr.Logger) *Helper\n```\n\n```go\nfunc (e *Helper) BuildWorkersAffinity(workers *appsv1.StatefulSet) (workersToUpdate *appsv1.StatefulSet, err error)\n```\nBuildWorkersAffinity builds workers affinity if it doesn't have\n\n```go\nfunc (e *Helper) CheckAndSyncFuseStatus(getRuntimeFn func(client.Client) (base.RuntimeInterface, error), fuseDsNamespacedName types.NamespacedName) (ready bool, err error)\n```\n\n```go\nfunc (e *Helper) CheckAndSyncMasterStatus(getRuntimeFn func(client.Client) (base.RuntimeInterface, error), masterStsNamespacedName types.NamespacedName) (ready bool, err error)\n```\n\n```go\nfunc (e *Helper) CheckAndSyncWorkerStatus(getRuntimeFn func(client.Client) (base.RuntimeInterface, error), workerStsNamespacedName types.NamespacedName) (readyOrPartialReady bool, err error)\n```\nCheckAndSyncWorkerStatus checks the worker statefulset's status and update it to runtime's status accordingly. It returns readyOrPartialReady to indicate if the worker statefulset is (partial) ready or not ready.\n\n```go\nfunc (e *Helper) CleanUpFuse() (count int, err error)\n```\nCleanUpFuse will cleanup node label for Fuse.\n\n```go\nfunc (e *Helper) GetFuseNodes() (nodes []corev1.Node, err error)\n```\nGetFuseNodes gets the node of fuses\n\n```go\nfunc (e *Helper) GetIpAddressesOfFuse() (ipAddresses []string, err error)\n```\nGetIpAddressesOfFuse gets Ipaddresses from the Fuse Node\n\n```go\nfunc (e *Helper) GetIpAddressesOfWorker() (ipAddresses []string, err error)\n```\nGetIpAddressesOfWorker gets Ipaddresses from the Worker Node\n\n```go\nfunc (e *Helper) GetWorkerNodes() (nodes []corev1.Node, err error)\n```\n\n```go\nfunc (e *Helper) SetupWorkers(runtime base.RuntimeInterface,\n\tcurrentStatus datav1alpha1.RuntimeStatus,\n\tworkers *appsv1.StatefulSet) (err error)\n```\nSetupWorkers checks the desired and current replicas of workers and makes an update over the status by setting phases and conditions. The function calls for a status update and finally returns error if anything unexpected happens.\n\n```go\nfunc (e *Helper) SyncReplicas(ctx cruntime.ReconcileRequestContext,\n\truntime base.RuntimeInterface,\n\tcurrentStatus datav1alpha1.RuntimeStatus,\n\tworkers *appsv1.StatefulSet) (err error)\n```\nCheckWorkersReady checks if workers are ready\n\n","path":"github.com/fluid-cloudnative/fluid/pkg/ctrl","name":"ctrl","synopsis":"","isRedistributable":true}
