Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultReporter ¶
Types ¶
type Account ¶
type Account interface { Identification() string ProvideMigrationContext(func(executionContext interface{}) error) error }
Account represents
type AccountProducer ¶
AccountProducer should list all the accounts that should be migrated.
type Connector ¶
type Connector func(executionContext interface{}) (migration.Target, error)
Connector should create a new `migration.Target` from the provided execution context.
All default implementation expect the `executionContext` itself to be the database connection reference. So, if you need something more complex, you should create your own.
See also `MongoConnector`.
type MigrationExecutor ¶
type MigrationExecutor struct {
// contains filtered or unexported fields
}
MigrationExecutor runs all migrations in all accounts listed by the `AccountProducer`.
func NewMigrationExecutor ¶
func NewMigrationExecutor(migrationReporter migration.Reporter, mtntnReporter Reporter, connector Connector, producer AccountProducer, source migration.Source) *MigrationExecutor
NewMigrationExecutor returns a new instance of a `MigrationExecutor`.
func (*MigrationExecutor) Run ¶
func (e *MigrationExecutor) Run(workers int, args ...string)
Run initializes the `go-prdcsm` starting the process.
func (*MigrationExecutor) Stop ¶
func (e *MigrationExecutor) Stop()
Stop stops the running pool of workers.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.