This commit adds and passes context around to (almost) every function. This allows cancelling (almost) every function call globally.
18 lines
526 B
Go
18 lines
526 B
Go
package meta
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/FAU-CDI/wisski-distillery/internal/models"
|
|
)
|
|
|
|
// Provision provisions new meta storage for this instance.
|
|
// NOTE(twiesing): This is a no-op, because we implement Purge.
|
|
func (meta *Meta) Provision(ctx context.Context, instance models.Instance, domain string) error {
|
|
return nil
|
|
}
|
|
|
|
// Purge purges the storage for the given instance.
|
|
func (meta *Meta) Purge(ctx context.Context, instance models.Instance, domain string) error {
|
|
return meta.Storage(instance.Slug).Purge(ctx)
|
|
}
|