Documentation ¶
Index ¶
- Constants
- Variables
- func HandleTenantUpdateError(db *gorm.DB, err error)
- func IsOlderThanTimeout(when time.Time, config *configuration.Data) bool
- type Executor
- type FilterCluster
- type FilterEnvType
- type GormRepository
- func (r *GormRepository) CanContinue() (bool, error)
- func (r *GormRepository) GetTenantsUpdate() (*TenantsUpdate, error)
- func (r *GormRepository) IncrementFailedCount() error
- func (r *GormRepository) PrepareForUpdating() error
- func (r *GormRepository) SaveTenantsUpdate(tenantUpdate *TenantsUpdate) error
- func (r *GormRepository) Stop() error
- func (r *GormRepository) UpdateLastTimeUpdated() error
- func (r *GormRepository) UpdateStatus(status Status) error
- type OneType
- type Repository
- type Status
- type TenantsUpdate
- type TenantsUpdater
- type VersionManager
Constants ¶
View Source
const TenantsUpdateAdvisoryLockID = 4242
View Source
const TenantsUpdateTableName = "tenants_update"
Variables ¶
View Source
var AllTypes = allTypes("no-limit")
Functions ¶
func HandleTenantUpdateError ¶
func IsOlderThanTimeout ¶
func IsOlderThanTimeout(when time.Time, config *configuration.Data) bool
Types ¶
type FilterCluster ¶
type FilterEnvType ¶
type FilterEnvType interface { IsOk(envType environment.Type) bool GetLimit() string }
type GormRepository ¶
type GormRepository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(tx *gorm.DB) *GormRepository
func (*GormRepository) CanContinue ¶
func (r *GormRepository) CanContinue() (bool, error)
func (*GormRepository) GetTenantsUpdate ¶
func (r *GormRepository) GetTenantsUpdate() (*TenantsUpdate, error)
func (*GormRepository) IncrementFailedCount ¶
func (r *GormRepository) IncrementFailedCount() error
func (*GormRepository) PrepareForUpdating ¶
func (r *GormRepository) PrepareForUpdating() error
func (*GormRepository) SaveTenantsUpdate ¶
func (r *GormRepository) SaveTenantsUpdate(tenantUpdate *TenantsUpdate) error
func (*GormRepository) Stop ¶
func (r *GormRepository) Stop() error
func (*GormRepository) UpdateLastTimeUpdated ¶
func (r *GormRepository) UpdateLastTimeUpdated() error
func (*GormRepository) UpdateStatus ¶
func (r *GormRepository) UpdateStatus(status Status) error
type OneType ¶
type OneType environment.Type
type Repository ¶
type Status ¶
type Status string
type TenantsUpdate ¶
type TenantsUpdate struct { LastVersionFabric8TenantUserFile string LastVersionFabric8TenantCheMtFile string LastVersionFabric8TenantCheQuotasFile string LastVersionFabric8TenantJenkinsFile string LastVersionFabric8TenantJenkinsQuotasFile string LastVersionFabric8TenantDeployFile string Status Status FailedCount int LastTimeUpdated time.Time CanContinue bool }
type TenantsUpdater ¶
type TenantsUpdater struct {
// contains filtered or unexported fields
}
func NewTenantsUpdater ¶
func NewTenantsUpdater( db *gorm.DB, config *configuration.Data, clusterService cluster.Service, updateExecutor Executor, filterEnvType FilterEnvType, limitToCluster string) *TenantsUpdater
func (*TenantsUpdater) UpdateAllTenants ¶
func (u *TenantsUpdater) UpdateAllTenants()
type VersionManager ¶
type VersionManager struct { Version string EnvTypes []environment.Type FileName string GetStoredVersion func(tu *TenantsUpdate) string // contains filtered or unexported fields }
func RetrieveVersionManagers ¶
func RetrieveVersionManagers() []*VersionManager
func (*VersionManager) IsVersionUpToDate ¶
func (vm *VersionManager) IsVersionUpToDate(tu *TenantsUpdate) bool
func (*VersionManager) SetCurrentVersion ¶
func (vm *VersionManager) SetCurrentVersion(tu *TenantsUpdate)
Click to show internal directories.
Click to hide internal directories.