Documentation ¶
Index ¶
Constants ¶
View Source
const (
// SchemaVersion identifies the schema version of RDB
SchemaVersion = "1.8.1"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BasicManager ¶
type BasicManager struct {
// contains filtered or unexported fields
}
BasicManager is the default implementation of manager interface
func (*BasicManager) Register ¶
func (bm *BasicManager) Register(migratorFactory MigratorFactory)
Register the migrator to the chain
type Manager ¶
type Manager interface { // Register the specified migrator to the execution chain Register(migratorFactory MigratorFactory) // Migrate data Migrate() error }
Manager for managing the related migrators
type MigratorChainNode ¶
type MigratorChainNode struct {
// contains filtered or unexported fields
}
MigratorChainNode is a wrapper to append the migrator to the chain with a next reference
type MigratorFactory ¶
type MigratorFactory func(pool *redis.Pool, namespace string) (RDBMigrator, error)
MigratorFactory is factory function to create RDBMigrator interface
type MigratorMeta ¶
MigratorMeta keeps the base info of the migrator
type PolicyMigrator ¶
type PolicyMigrator struct {
// contains filtered or unexported fields
}
PolicyMigrator migrate the cron job policy to new schema
func (*PolicyMigrator) Metadata ¶
func (pm *PolicyMigrator) Metadata() *MigratorMeta
Metadata returns the base information of this migrator
type RDBMigrator ¶
type RDBMigrator interface { // Metadata info of the migrator Metadata() *MigratorMeta // Migrate executes the real migration work Migrate() error }
RDBMigrator defines the action to migrate redis data
func PolicyMigratorFactory ¶
func PolicyMigratorFactory(pool *redis.Pool, namespace string) (RDBMigrator, error)
PolicyMigratorFactory is a factory func to create PolicyMigrator
Click to show internal directories.
Click to hide internal directories.