Documentation ¶
Index ¶
- type Backend
- func (backend *Backend) AddRepository(r *core.Repository) (added bool, err error)
- func (backend *Backend) AttemptLeadership() error
- func (backend *Backend) ContinuousElections(logError func(error))
- func (backend *Backend) DeleteRepository(r *core.Repository) (deleted bool, err error)
- func (backend *Backend) ExpireStaleMigrations(inStatus, toStatus core.MigrationStatus, staleMinutes int) error
- func (backend *Backend) ForceLeadership() error
- func (backend *Backend) ForgetPR(pr *core.PullRequest) (err error)
- func (backend *Backend) ForgetPRStatementsAndMigrations(pr *core.PullRequest) (err error)
- func (backend *Backend) GetLeader() string
- func (backend *Backend) GetStateDescription() string
- func (backend *Backend) IsHealthy() bool
- func (backend *Backend) IsLeader() bool
- func (backend *Backend) OwnMigration(migration *core.Migration, token string) (ownedMigration *core.Migration, err error)
- func (backend *Backend) OwnReadyMigration(withStrategy core.MigrationStrategy, token string) (migration *core.Migration, err error)
- func (backend *Backend) QueuePRMigrations(pr *core.PullRequest) (countAffected int64, err error)
- func (backend *Backend) ReadActivePRs() (prs []core.PullRequest, err error)
- func (backend *Backend) ReadGhostReadyMigrations(tokenHint string) (migrations []core.Migration, err error)
- func (backend *Backend) ReadLeadership() (leaderState int64, leader string, err error)
- func (backend *Backend) ReadMigration(pr *core.PullRequest, tableName string) (migration *core.Migration, err error)
- func (backend *Backend) ReadMigrationByToken(token string) (migration *core.Migration, err error)
- func (backend *Backend) ReadNonCancelledMigrations(pr *core.PullRequest) (migrations []core.Migration, err error)
- func (backend *Backend) ReadNonCompletedPRsWithCompletedMigrations() (prs []core.PullRequest, err error)
- func (backend *Backend) ReadOpenPRs() (prs []core.PullRequest, err error)
- func (backend *Backend) ReadPR(pr *core.PullRequest) (err error)
- func (backend *Backend) ReadPullRequestMigrationStatements(pr *core.PullRequest) (statements []core.PullRequestMigrationStatement, err error)
- func (backend *Backend) ReadRepositories() (repos []core.Repository, err error)
- func (backend *Backend) ReadRepository(r *core.Repository) (err error)
- func (backend *Backend) ReadRepositoryMappings(r *core.Repository) (mappings []core.RepositoryProductionMapping, err error)
- func (backend *Backend) Reelect() error
- func (backend *Backend) RemoveRepositoryMapping(m *core.RepositoryProductionMapping) (err error)
- func (backend *Backend) ServiceId() string
- func (backend *Backend) SubmitMigrations(migrations []*core.Migration) (countSubmitted int64, err error)
- func (backend *Backend) SubmitPR(pr *core.PullRequest) (err error)
- func (backend *Backend) SubmitPRStatements(pr *core.PullRequest, statements []string) (err error)
- func (backend *Backend) UpdateMigrationStatus(migration *core.Migration, fromStatus, toStatus core.MigrationStatus, ...) (countAffected int64, err error)
- func (backend *Backend) UpdateMigrationStrategy(migration *core.Migration, fromStrategy, toStrategy core.MigrationStrategy) (countAffected int64, err error)
- func (backend *Backend) UpdateMigrationTokenHint(migration *core.Migration, tokenHint string) (err error)
- func (backend *Backend) UpdatePRMigrationsStatus(pr *core.PullRequest, fromStatus, toStatus core.MigrationStatus, ...) (countAffected int64, err error)
- func (backend *Backend) UpdatePRPriority(pr *core.PullRequest, priority core.PullRequestPriority) (countAffected int64, err error)
- func (backend *Backend) UpdatePRStatus(pr *core.PullRequest, toStatus core.PullRequestStatus) (countAffected int64, err error)
- func (backend *Backend) UpdateRepository(r *core.Repository) (updated bool, err error)
- func (backend *Backend) WriteRepositoryMapping(m *core.RepositoryProductionMapping) (err error)
- type TopologyDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func (*Backend) AddRepository ¶
func (backend *Backend) AddRepository(r *core.Repository) (added bool, err error)
func (*Backend) AttemptLeadership ¶
func (*Backend) ContinuousElections ¶
ContinuousElections is a utility function to routinely observe leadership state. It doesn't actually do much; merely takes notes.
func (*Backend) DeleteRepository ¶
func (backend *Backend) DeleteRepository(r *core.Repository) (deleted bool, err error)
func (*Backend) ExpireStaleMigrations ¶
func (backend *Backend) ExpireStaleMigrations(inStatus, toStatus core.MigrationStatus, staleMinutes int) error
func (*Backend) ForceLeadership ¶
func (*Backend) ForgetPRStatementsAndMigrations ¶
func (backend *Backend) ForgetPRStatementsAndMigrations(pr *core.PullRequest) (err error)
func (*Backend) GetStateDescription ¶
func (*Backend) OwnMigration ¶
func (*Backend) OwnReadyMigration ¶
func (*Backend) QueuePRMigrations ¶
func (backend *Backend) QueuePRMigrations(pr *core.PullRequest) (countAffected int64, err error)
func (*Backend) ReadActivePRs ¶
func (backend *Backend) ReadActivePRs() (prs []core.PullRequest, err error)
func (*Backend) ReadGhostReadyMigrations ¶
func (*Backend) ReadLeadership ¶
func (*Backend) ReadMigration ¶
func (*Backend) ReadMigrationByToken ¶
func (*Backend) ReadNonCancelledMigrations ¶
func (*Backend) ReadNonCompletedPRsWithCompletedMigrations ¶
func (backend *Backend) ReadNonCompletedPRsWithCompletedMigrations() (prs []core.PullRequest, err error)
func (*Backend) ReadOpenPRs ¶
func (backend *Backend) ReadOpenPRs() (prs []core.PullRequest, err error)
func (*Backend) ReadPullRequestMigrationStatements ¶
func (backend *Backend) ReadPullRequestMigrationStatements(pr *core.PullRequest) (statements []core.PullRequestMigrationStatement, err error)
func (*Backend) ReadRepositories ¶
func (backend *Backend) ReadRepositories() (repos []core.Repository, err error)
func (*Backend) ReadRepository ¶
func (backend *Backend) ReadRepository(r *core.Repository) (err error)
func (*Backend) ReadRepositoryMappings ¶
func (backend *Backend) ReadRepositoryMappings(r *core.Repository) (mappings []core.RepositoryProductionMapping, err error)
func (*Backend) RemoveRepositoryMapping ¶
func (backend *Backend) RemoveRepositoryMapping(m *core.RepositoryProductionMapping) (err error)
func (*Backend) SubmitMigrations ¶
func (*Backend) SubmitPRStatements ¶
func (backend *Backend) SubmitPRStatements(pr *core.PullRequest, statements []string) (err error)
func (*Backend) UpdateMigrationStatus ¶
func (backend *Backend) UpdateMigrationStatus(migration *core.Migration, fromStatus, toStatus core.MigrationStatus, withStrategy core.MigrationStrategy) (countAffected int64, err error)
func (*Backend) UpdateMigrationStrategy ¶
func (*Backend) UpdateMigrationTokenHint ¶
func (*Backend) UpdatePRMigrationsStatus ¶
func (backend *Backend) UpdatePRMigrationsStatus(pr *core.PullRequest, fromStatus, toStatus core.MigrationStatus, withStrategy core.MigrationStrategy) (countAffected int64, err error)
func (*Backend) UpdatePRPriority ¶
func (backend *Backend) UpdatePRPriority(pr *core.PullRequest, priority core.PullRequestPriority) (countAffected int64, err error)
func (*Backend) UpdatePRStatus ¶
func (backend *Backend) UpdatePRStatus(pr *core.PullRequest, toStatus core.PullRequestStatus) (countAffected int64, err error)
func (*Backend) UpdateRepository ¶
func (backend *Backend) UpdateRepository(r *core.Repository) (updated bool, err error)
func (*Backend) WriteRepositoryMapping ¶
func (backend *Backend) WriteRepositoryMapping(m *core.RepositoryProductionMapping) (err error)
type TopologyDB ¶
type TopologyDB struct {
// contains filtered or unexported fields
}
func NewTopologyDB ¶
func (*TopologyDB) Exec ¶
func (topology *TopologyDB) Exec(query string) (rowsAffected int64, err error)
func (*TopologyDB) Get ¶
func (topology *TopologyDB) Get(dest interface{}, query string, args ...interface{}) (err error)
func (*TopologyDB) Ping ¶
func (topology *TopologyDB) Ping() (readOnly bool, err error)
Click to show internal directories.
Click to hide internal directories.