Documentation
¶
Index ¶
Constants ¶
View Source
const ( FileSource SourceType = "file" WebSource SourceType = "web" SourceStateUnknown SourceState = "Unknown" SourceStatePending SourceState = "Pending" SourceStateScheduling SourceState = "Scheduling" SourceStateProcessing SourceState = "Processing" SourceStateIdle SourceState = "Idle" SourceStateReady SourceState = "ReadyToUse" SourceStateFailed SourceState = "Failed" SourceStateDropped SourceState = "Dropped" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseRequest ¶
type DatabaseRequest struct {
Name string `yaml:"name" json:"name" validate:"required,max=63,id" binding:"required,max=63,id" help:"Name of the database"`
Owner string `yaml:"owner" json:"owner" validate:"required,max=63,id" binding:"required,max=63,id" help:"Owner of the database"`
PasswordFile string `yaml:"password_file" json:"-" validate:"required,file" binding:"-" help:"Path to the password file of the database owner"`
Password string `yaml:"-" json:"password" binding:"required,min=8,max=256" help:"Password of the database owner"`
InstanceName string `` /* 137-byte string literal not displayed */
MigrateFrom string `` /* 155-byte string literal not displayed */
BackupPath string `yaml:"backup_path" json:"-" validate:"omitempty,file" binding:"-" help:"Path to the backup file"`
}
func (*DatabaseRequest) GetName ¶
func (s *DatabaseRequest) GetName() string
func (*DatabaseRequest) IsConfigChanged ¶
func (s *DatabaseRequest) IsConfigChanged(newSource *DatabaseRequest) bool
func (*DatabaseRequest) PasswordContent ¶
func (s *DatabaseRequest) PasswordContent() (string, error)
type DatabaseSource ¶
type DatabaseSource struct {
*DatabaseRequest
Type SourceType `yaml:"-"`
DatabaseSourceStatus
}
func (*DatabaseSource) NextRetryDelay ¶
func (s *DatabaseSource) NextRetryDelay() time.Duration
func (*DatabaseSource) ResetRetryDelay ¶
func (s *DatabaseSource) ResetRetryDelay()
func (*DatabaseSource) Synced ¶
func (s *DatabaseSource) Synced() bool
func (*DatabaseSource) UpdateState ¶
func (s *DatabaseSource) UpdateState(dbStatus *grpcServerApi.DbStatusResponse) bool
type DatabaseSourceStatus ¶
type SourceAdder ¶
type SourceAdder interface {
AddDatabaseSource(source *DatabaseSource) error
}
type SourceGetter ¶
type SourceGetter interface {
IsReady(name string, instName string) bool
GetSource(name string) *DatabaseSource
}
type SourceHandler ¶
type SourceHandler interface {
SourceAdder
SourceRemover
SourceGetter
}
type SourceRemover ¶
type SourceState ¶
type SourceState string
type SourceType ¶
type SourceType string
Click to show internal directories.
Click to hide internal directories.