Documentation ¶
Index ¶
Constants ¶
View Source
const ( ApplianceConfigure = "ApplianceConfigure" ContainerConfigure = "ContainerConfigure" ApplianceVersionKey = "guestinfo.vice./init/version/PluginVersion" ContainerVersionKey = "guestinfo.vice./version/PluginVersion" )
Variables ¶
View Source
var (
Migrator = NewDataMigrator()
)
Functions ¶
This section is empty.
Types ¶
type DataMigration ¶
type DataMigration interface { // Register plugin to data migration system Register(version int, target string, plugin Plugin) error // Migrate data with current version ID, return maximum ID number of executed plugins Migrate(ctx context.Context, s *session.Session, target string, currentVersion int, data interface{}) (int, error) // LatestVersion return the latest plugin version for specified target LatestVersion(target string) int }
func NewDataMigrator ¶
func NewDataMigrator() DataMigration
type DataMigrator ¶
type DataMigrator struct {
// contains filtered or unexported fields
}
func (*DataMigrator) LatestVersion ¶
func (m *DataMigrator) LatestVersion(target string) int
LatestVersion return the latest plugin version for specified target
Click to show internal directories.
Click to hide internal directories.