Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterExport ¶
func RegisterExport( coordinator Coordinator, clock clock.Clock, logger logger.Logger, )
RegisterExport registers the export operations with the given coordinator.
func RegisterImport ¶
func RegisterImport( coordinator Coordinator, clock clock.Clock, logger logger.Logger, )
RegisterImport registers the import operations with the given coordinator.
Types ¶
type Coordinator ¶
type Coordinator interface { // Add adds the given operation to the migration. Add(modelmigration.Operation) }
Coordinator is the interface that is used to add operations to a migration.
type ExportService ¶
type ExportService interface { // ExportResources returns the list of application and unit resources to // export for the given application. // // If the application exists but doesn't have any resources, no error are // returned, the result just contains an empty list. ExportResources(ctx context.Context, name string) ( resource.ExportedResources, error, ) }
ExportService provides a subset of the resource domain service methods needed for resource export.
type ImportService ¶
type ImportService interface { // ImportResources sets resources imported in migration. It first builds all the // resources to insert from the arguments, then inserts them at the end so as to // wait as long as possible before turning into a write transaction. ImportResources(ctx context.Context, args resource.ImportResourcesArgs) error // DeleteImportedResources deletes all imported resource associated with the // given applications during an import rollback. DeleteImportedResources( ctx context.Context, appNames []string, ) error }
ImportService provides a subset of the resource domain service methods needed for resource import.
Click to show internal directories.
Click to hide internal directories.