modelmigration

package
v0.0.0-...-c0f2abd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterImport

func RegisterImport(coordinator Coordinator, 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 PortService

type PortService interface {
	// UpdateUnitPorts updates the open ports on the unit with the given UUID.
	UpdateUnitPorts(
		ctx context.Context,
		unitUUID coreunit.UUID,
		openPorts, closePorts network.GroupedPortRanges,
	) error

	// GetUnitUUID returns the UUID of the unit with the given name.
	GetUnitUUID(context.Context, coreunit.Name) (coreunit.UUID, error)
}

PortService provides a subset of the port domain service methods needed for open ports import.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL