wisski-cloud-distillery/internal/dis/component/provision.go
Tom Wiesing 3455f491ca
Add context
This commit adds and passes context around to (almost) every function.
This allows cancelling (almost) every function call globally.
2022-11-29 15:32:31 +01:00

20 lines
627 B
Go

package component
import (
"context"
"github.com/FAU-CDI/wisski-distillery/internal/models"
)
// Provisionable is a component that can be provisioned
type Provisionable interface {
Component
// Provision provisions resources specific to the provided instance.
// Domain holds the full (unique) domain name of the given instance.
Provision(ctx context.Context, instance models.Instance, domain string) error
// Purge purges resources specific to the provided instance.
// Domain holds the full (unique) domain name of the given instance.
Purge(ctx context.Context, instance models.Instance, domain string) error
}