Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AutocompleteGDCVForVMWareClusterNamesTask = inspectiontaskbase.NewCachedTask(googlecloudclustergdcvmware_contract.AutocompleteGDCVForVMWareClusterNamesTaskID, []taskid.UntypedTaskReference{ googlecloudclustergdcvmware_contract.ClusterListFetcherTaskID.Ref(), googlecloudcommon_contract.InputProjectIdTaskID.Ref(), }, func(ctx context.Context, prevValue inspectiontaskbase.CacheableTaskResult[*googlecloudk8scommon_contract.AutocompleteClusterNameList]) (inspectiontaskbase.CacheableTaskResult[*googlecloudk8scommon_contract.AutocompleteClusterNameList], error) { projectID := coretask.GetTaskResult(ctx, googlecloudcommon_contract.InputProjectIdTaskID.Ref()) if projectID != "" && projectID == prevValue.DependencyDigest { return prevValue, nil } if projectID != "" { clusterListFetcher := coretask.GetTaskResult(ctx, googlecloudclustergdcvmware_contract.ClusterListFetcherTaskID.Ref()) clusterNames, err := clusterListFetcher.GetClusters(ctx, projectID) if err != nil { slog.WarnContext(ctx, fmt.Sprintf("Failed to read the cluster names in the project %s\n%s", projectID, err)) return inspectiontaskbase.CacheableTaskResult[*googlecloudk8scommon_contract.AutocompleteClusterNameList]{ DependencyDigest: projectID, Value: &googlecloudk8scommon_contract.AutocompleteClusterNameList{ ClusterNames: []string{}, Error: fmt.Sprintf("Failed to get the list from API:%s", err.Error()), }, }, nil } return inspectiontaskbase.CacheableTaskResult[*googlecloudk8scommon_contract.AutocompleteClusterNameList]{ DependencyDigest: projectID, Value: &googlecloudk8scommon_contract.AutocompleteClusterNameList{ ClusterNames: clusterNames, Error: "", }, }, nil } return inspectiontaskbase.CacheableTaskResult[*googlecloudk8scommon_contract.AutocompleteClusterNameList]{ DependencyDigest: projectID, Value: &googlecloudk8scommon_contract.AutocompleteClusterNameList{ ClusterNames: []string{}, Error: "Project ID is empty", }, }, nil }, inspectioncore_contract.InspectionTypeLabel(googlecloudclustergdcvmware_contract.InspectionTypeId))
AutocompleteGDCVForVMWareClusterNamesTask is a task that provides autocomplete suggestions for GDCV for VMWare cluster names.
View Source
var ClusterListFetcherTask = coretask.NewTask(googlecloudclustergdcvmware_contract.ClusterListFetcherTaskID, []taskid.UntypedTaskReference{ googlecloudcommon_contract.APIClientFactoryTaskID.Ref(), googlecloudcommon_contract.APIClientCallOptionsInjectorTaskID.Ref(), }, func(ctx context.Context) (googlecloudclustergdcvmware_contract.ClusterListFetcher, error) { return &googlecloudclustergdcvmware_contract.ClusterListFetcherImpl{}, nil })
ClusterListFetcherTask inject the default implementation for ClusterListFetcher
View Source
var GDCVForVMWareClusterNamePrefixTask = coretask.NewTask(googlecloudclustergdcvmware_contract.ClusterNamePrefixTaskIDForGDCVForVMWare, []taskid.UntypedTaskReference{}, func(ctx context.Context) (string, error) { return "", nil }, inspectioncore_contract.InspectionTypeLabel(googlecloudclustergdcvmware_contract.InspectionTypeId))
GDCVForVMWareClusterNamePrefixTask is a task that returns an empty string as the cluster name prefix for GDCV for VMWare. This task is necessary to satisfy the dependency of the log source profile, but GDCV for VMWare does not require a prefix.
Functions ¶
func Register ¶
func Register(registry coreinspection.InspectionTaskRegistry) error
Register registers all googlecloudclustergdcvmware inspection tasks to the registry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.