workflows
workflows.GetCurrentCluster
Copy
Ask AI
type Task struct{}
func (t *Task) Execute(ctx context.Context) error {
clusterSlug, err := workflows.GetCurrentCluster(ctx)
if err != nil {
return fmt.Errorf("failed to get current cluster: %w", err)
}
return nil
}
Copy
Ask AI
workflows.GetCurrentCluster(ctx context.Context) (string, error)
Get the current cluster slug.
This function is intended to be used in tasks.
Returns
The current cluster slug.
Copy
Ask AI
type Task struct{}
func (t *Task) Execute(ctx context.Context) error {
clusterSlug, err := workflows.GetCurrentCluster(ctx)
if err != nil {
return fmt.Errorf("failed to get current cluster: %w", err)
}
return nil
}
Was this page helpful?
Copy
Ask AI
type Task struct{}
func (t *Task) Execute(ctx context.Context) error {
clusterSlug, err := workflows.GetCurrentCluster(ctx)
if err != nil {
return fmt.Errorf("failed to get current cluster: %w", err)
}
return nil
}
Assistant
Responses are generated using AI and may contain mistakes.