Documentation
¶
Index ¶
- type BackupRequest
- type BackupResponse
- type CreateRDBMSRequest
- type CronPlanRequest
- type CronTaskTracker
- type ErrorResponse
- type HealthHistory
- type HealthRecord
- type HealthScheduler
- type HealthStatus
- type KVPair
- type KVSetRequest
- type PullImageRequest
- type ReconfigureRequest
- type RestoreRequest
- type RestoreResponse
- type Server
- type SwitchRequest
- type UpdateStateRequest
- type UpgradeRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupRequest ¶
type BackupRequest struct {
Comment string `json:"comment,omitempty"`
}
type BackupResponse ¶
type CreateRDBMSRequest ¶
type CreateRDBMSRequest struct {
Name string `json:"name"`
Version string `json:"version"`
Image string `json:"image"`
Port int `json:"port"`
CPUCores int `json:"cpuCores"`
RAMMB int `json:"ramMb"`
ParameterGroup string `json:"parameterGroup"`
}
Request/Response types for RDBMS operations
type CronPlanRequest ¶
type CronTaskTracker ¶
type CronTaskTracker struct {
// contains filtered or unexported fields
}
CronTaskTracker manages sequential execution of cron tasks
func NewCronTaskTracker ¶
func NewCronTaskTracker(opDeps *operations.Dependencies, executor *operations.Executor) *CronTaskTracker
NewCronTaskTracker creates a new cron task tracker
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
}
ErrorResponse represents an API error response
type HealthHistory ¶
type HealthHistory struct {
Records []*HealthRecord `json:"records"`
Timestamp string `json:"timestamp"`
}
HealthHistory represents the health history response
type HealthRecord ¶
type HealthRecord struct {
ID int64 `json:"id"`
Timestamp string `json:"timestamp"`
TimestampUnix int64 `json:"timestampUnix"`
InProgress bool `json:"inProgress"`
HealthyAll bool `json:"healthyAll"`
HealthyHost bool `json:"healthyHost"`
HealthyInstances []string `json:"healthyInstances"`
BrokenInstances []string `json:"brokenInstances"`
FailDetails string `json:"failDetails"`
}
HealthRecord represents a single health check record for API response
type HealthScheduler ¶
type HealthScheduler struct {
// contains filtered or unexported fields
}
HealthScheduler manages the health check scheduling with process mutex
func NewHealthScheduler ¶
func NewHealthScheduler(healthChecker *services.HealthChecker, intervalSec int) *HealthScheduler
func (*HealthScheduler) IsRunning ¶
func (hs *HealthScheduler) IsRunning() bool
IsRunning returns whether a health check is currently running
func (*HealthScheduler) Pause ¶
func (hs *HealthScheduler) Pause()
Pause pauses health checks (new ones won't start)
func (*HealthScheduler) Start ¶
func (hs *HealthScheduler) Start(ctx context.Context)
func (*HealthScheduler) Unpause ¶
func (hs *HealthScheduler) Unpause()
Unpause resumes health checks
func (*HealthScheduler) WaitForCompletion ¶
func (hs *HealthScheduler) WaitForCompletion(timeout time.Duration) bool
WaitForCompletion waits for any running health check to complete
type HealthStatus ¶
type HealthStatus struct {
Overall string `json:"overall"` // "healthy", "degraded", "unhealthy"
LastCheck *HealthRecord `json:"lastCheck"`
CheckRunning bool `json:"checkRunning"`
Timestamp string `json:"timestamp"`
}
HealthStatus represents the detailed health status response
type KVPair ¶
type KVPair struct {
Key string `json:"key"`
Value string `json:"value"`
UpdatedAt string `json:"updatedAt"`
}
KVPair represents a key-value pair for API responses
type KVSetRequest ¶
KVSetRequest represents the request body for setting a key-value pair
type PullImageRequest ¶
Request types for image operations
type ReconfigureRequest ¶
type ReconfigureRequest struct {
ParameterGroup string `json:"parameterGroup"`
}
type RestoreRequest ¶
type RestoreRequest struct {
BackupID int `json:"backupId,omitempty"`
FilePath string `json:"filePath,omitempty"`
DatabaseName string `json:"databaseName"`
RestoreAs string `json:"restoreAs,omitempty"`
}
RestoreRequest represents the request body for restore
type RestoreResponse ¶
type RestoreResponse struct {
TargetDatabase string `json:"targetDatabase"`
SourceBackup string `json:"sourceBackup"`
Message string `json:"message"`
}
RestoreResponse represents the response from restore
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) MintToken ¶ added in v0.1.40
MintToken creates a new CLI auth token and returns its plaintext. The daemon does not mint tokens on its own (see NewServer); this is the programmatic equivalent of `oddk auth mint`, used by tests to obtain a usable token.
type SwitchRequest ¶
type UpdateStateRequest ¶
type UpdateStateRequest struct {
State string `json:"state"`
}
type UpgradeRequest ¶
Source Files
¶
- cron_scheduler.go
- cron_tasks.go
- handlers_backup.go
- handlers_cron.go
- handlers_customkv.go
- handlers_database.go
- handlers_health.go
- handlers_image.go
- handlers_notification.go
- handlers_offsite.go
- handlers_parameters.go
- handlers_password.go
- handlers_rdbms.go
- handlers_restore.go
- health_scheduler.go
- reconcile.go
- reencrypt.go
- router.go
- router_debug_stub.go
- server.go
- utils.go