Documentation ¶
Overview ¶
Package models provides Database Lab struct.
Index ¶
Constants ¶
View Source
const ( StatusOK StatusCode = "OK" StatusCreating StatusCode = "CREATING" StatusResetting StatusCode = "RESETTING" StatusDeleting StatusCode = "DELETING" StatusExporting StatusCode = "EXPORTING" StatusFatal StatusCode = "FATAL" CloneMessageOK = "Clone is ready to accept Postgres connections." CloneMessageCreating = "Clone is being created." CloneMessageResetting = "Clone is being reset." CloneMessageDeleting = "Clone is being deleted." CloneMessageFatal = "Cloning failure." InstanceMessageOK = "Instance is ready" )
Constants declares available status codes and messages.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checklist ¶
type Checklist struct { Success bool `json:"overall_success"` Duration bool `json:"session_duration_acceptable"` Locks bool `json:"no_long_dangerous_locks"` }
Checklist represents a list of observation checks.
type Clone ¶
type Clone struct { ID string `json:"id"` Snapshot *Snapshot `json:"snapshot"` Protected bool `json:"protected"` DeleteAt string `json:"deleteAt"` CreatedAt string `json:"createdAt"` Status Status `json:"status"` DB Database `json:"db"` Metadata CloneMetadata `json:"metadata"` }
Clone defines a clone model.
type CloneMetadata ¶
type CloneMetadata struct { CloneDiffSize uint64 `json:"cloneDiffSize"` CloneDiffSizeHR string `json:"cloneDiffSizeHR"` CloningTime float64 `json:"cloningTime"` MaxIdleMinutes uint `json:"maxIdleMinutes"` }
CloneMetadata contains fields describing a clone model.
type Error ¶
Error struct represents a response error.
type FileSystem ¶
type FileSystem struct { Size uint64 `json:"size"` SizeHR string `json:"sizeHR"` Free uint64 `json:"free"` FreeHR string `json:"freeHR"` Used uint64 `json:"used"` UsedHR string `json:"usedHR"` }
FileSystem describes state of a file system.
type Health ¶
type Health struct {
Version string `json:"engine_version"`
}
Health represents a response for heath-check requests.
type InstanceStatus ¶
type InstanceStatus struct { Status *Status `json:"status"` FileSystem *FileSystem `json:"fileSystem"` DataSize uint64 `json:"dataSize"` DataSizeHR string `json:"dataSizeHR"` ExpectedCloningTime float64 `json:"expectedCloningTime"` NumClones uint64 `json:"numClones"` Clones []*Clone `json:"clones"` }
type Interval ¶
type Interval struct { StartedAt time.Time `json:"started_at"` Duration float64 `json:"duration"` Warning string `json:"warning"` }
Interval represents data of an observation interval.
type ObservationResult ¶
type ObservationResult struct { Status string `json:"status"` Intervals []Interval `json:"intervals"` Summary Summary `json:"summary"` }
ObservationResult represents a result of observation session.
type PatchCloneRequest ¶
type PatchCloneRequest struct {
Protected bool `json:"protected"`
}
PatchCloneRequest defines a struct for clone updating.
type Status ¶
type Status struct { Code StatusCode `json:"code"` Message string `json:"message"` }
Status defines the status of clones and instance.
Click to show internal directories.
Click to hide internal directories.