Documentation
¶
Index ¶
- func RunMigrations(dbConf *config.Storage) error
- type DB
- func (db *DB) CreateOrUpdateStageAndStatusForIndex(requestId int, index string, stage string, status string, updateTime time.Time) error
- func (db *DB) DeleteReindexRequest(requestID int) error
- func (db *DB) DeleteReindexRequestDetail(id int) error
- func (db *DB) GetLatestReindexRequestID() (int, error)
- func (db *DB) GetReindexStatus(requestID int) (*StatusResponse, error)
- func (db *DB) GetStageForIndex(requestId int, index string) ([]*StageDetail, error)
- func (db *DB) InsertReindexRequest(status string, currentTime time.Time) (int, error)
- func (db *DB) InsertReindexRequestDetailed(detail ReindexRequestDetailed, currentTime time.Time) error
- func (db *DB) UpdateAliasesForIndex(index string, hasAlias bool, alias []string, requestID int, ...) error
- func (db *DB) UpdateReindexRequest(requestID int, status string, currentTime time.Time) error
- func (db *DB) UpdateReindexStatus(requestID int, index, status string, timestamp time.Time) error
- func (db *DB) UpdateStageDetailsForIndex(requestId int, index string, stageDetails []*StageDetail) error
- func (db *DB) UpdateTaskIDForReindexRequest(requestID int, indexName string, taskID string, currentTime time.Time) error
- type IndexStatusDetail
- type ReindexRequest
- type ReindexRequestDetailed
- type StageDetail
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunMigrations ¶
Types ¶
type DB ¶
func (*DB) CreateOrUpdateStageAndStatusForIndex ¶
func (*DB) DeleteReindexRequest ¶
Delete a reindex request
func (*DB) DeleteReindexRequestDetail ¶
Delete a reindex request detail
func (*DB) GetLatestReindexRequestID ¶
func (*DB) GetReindexStatus ¶
func (db *DB) GetReindexStatus(requestID int) (*StatusResponse, error)
Get the latest reindex request status for a given request
func (*DB) GetStageForIndex ¶
func (db *DB) GetStageForIndex(requestId int, index string) ([]*StageDetail, error)
func (*DB) InsertReindexRequest ¶
Create a new reindex request with a random request_id
func (*DB) InsertReindexRequestDetailed ¶
func (db *DB) InsertReindexRequestDetailed(detail ReindexRequestDetailed, currentTime time.Time) error
Insert reindex request detailed entry
func (*DB) UpdateAliasesForIndex ¶
func (*DB) UpdateReindexRequest ¶
Update an existing reindex request
func (*DB) UpdateReindexStatus ¶
func (*DB) UpdateStageDetailsForIndex ¶
func (db *DB) UpdateStageDetailsForIndex(requestId int, index string, stageDetails []*StageDetail) error
type IndexStatusDetail ¶
type ReindexRequest ¶
type ReindexRequest struct { ID int `db:"id"` Status string `db:"status"` CreatedAt time.Time `db:"created_at"` LastUpdated time.Time `db:"last_updated"` }
ReindexRequest represents the reindex_requests table
type ReindexRequestDetailed ¶
type ReindexRequestDetailed struct { ID int `db:"id"` RequestID int `db:"request_id"` Index string `db:"index"` FromVersion string `db:"from_version"` ToVersion string `db:"to_version"` Stage []StageDetail `db:"stage"` OsTaskID string `db:"os_task_id"` Heartbeat time.Time `db:"heartbeat"` HavingAlias bool `db:"having_alias"` AliasList string `db:"alias_list"` CreatedAt time.Time `db:"created_at"` UpdatedAt time.Time `db:"updated_at"` }
ReindexRequestDetailed represents the reindex_request_detailed table
type StageDetail ¶
type StatusResponse ¶
type StatusResponse struct { RequestID int `json:"request_id"` Status string `json:"status"` Indexes []IndexStatusDetail `json:"indexes"` }
StatusResponse represents the response structure for reindex status
Click to show internal directories.
Click to hide internal directories.