Documentation
¶
Index ¶
Constants ¶
View Source
const ServiceName = "example-migrator"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExampleMigrator ¶
type ExampleMigrator struct{}
ExampleMigrator demonstrates a one-shot service with dependency behavior. It depends on "example-database", runs its migrations, and exits cleanly. It's also an allowed failure because migration issues shouldn't take down the whole app.
func New ¶
func New() (*ExampleMigrator, error)
func (*ExampleMigrator) Dependencies ¶
func (m *ExampleMigrator) Dependencies() []string
Dependencies makes ExampleMigrator implement the Dependent interface. Starts after example-database.
func (*ExampleMigrator) IsAllowedFailure ¶
func (m *ExampleMigrator) IsAllowedFailure() bool
IsAllowedFailure makes ExampleMigrator implement the AllowedFailure interface. Migration failures don't bring down the whole app.
func (*ExampleMigrator) Name ¶
func (m *ExampleMigrator) Name() string
Click to show internal directories.
Click to hide internal directories.