
com.streamsend.pillar.cli.Command.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pillar Show documentation
Show all versions of pillar Show documentation
Pillar manages migrations for your Cassandra data stores.
package com.streamsend.pillar.cli
import com.typesafe.config.Config
import java.io.File
import com.streamsend.pillar.{Reporter, DataStore, Registry}
object Command {
def buildFromConfiguration(commandLineConfiguration: CommandLineConfiguration, applicationConfiguration: Config)(implicit registryConstructor: ((File, Reporter) => Registry), reporter: Reporter): Command = {
val dataStore = DataStore.fromConfiguration(commandLineConfiguration.dataStore, commandLineConfiguration.environment, applicationConfiguration)
val registry = registryConstructor(new File(commandLineConfiguration.migrationsDirectory, dataStore.name), reporter)
new Command(commandLineConfiguration.command,
dataStore,
commandLineConfiguration.timeStampOption,
registry
)
}
}
case class Command(action: MigratorAction, dataStore: DataStore, timeStampOption: Option[Long], registry: Registry)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy