Documentation
¶
Index ¶
- type Coordinator
- type ObjectsExpiredPayload
- type ObjectsExpiredStatusResponse
- func (p ObjectsExpiredStatusResponse) CheckContentTypeHeaderReq(r *http.Request) (string, bool)
- func (p ObjectsExpiredStatusResponse) MIME() string
- func (p ObjectsExpiredStatusResponse) SetContentTypeHeader(w http.ResponseWriter)
- func (p ObjectsExpiredStatusResponse) SetContentTypeHeaderReq(r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func NewCoordinator ¶
func NewCoordinator(schemaReader schemaUC.SchemaReader, schemaGetter schemaUC.SchemaGetter, db *db.DB, logger logrus.FieldLogger, clusterClient *http.Client, nodeResolver nodeResolver) *Coordinator
func (*Coordinator) Start ¶
func (c *Coordinator) Start(ctx context.Context, targetOwnNode bool, ttlTime, deletionTime time.Time) error
Start triggers the deletion of expired objects.
It is expected to be called periodically, e.g., via a cron job on the RAFT Leader to ensure that there are no parallel executions running. The RAFT leader will send a request to a remote node in multi-node clusters as the coordinator of the next deletion run to not add any additional load on the leader. In single-node clusters, it will execute the deletion locally.
There should always only one deletion run ongoing at any time. In case of remote deletions it will check with the last node used for deletion if the previous run is still ongoing and skip the current run if so.
type ObjectsExpiredPayload ¶
type ObjectsExpiredPayload struct {
Class string `json:"class"`
ClassVersion uint64 `json:"class_version"`
Prop string `json:"prop"`
TtlMilli int64 `json:"ttlMilli"`
DelMilli int64 `json:"delMilli"`
}
func (ObjectsExpiredPayload) CheckContentTypeHeaderReq ¶
func (p ObjectsExpiredPayload) CheckContentTypeHeaderReq(r *http.Request) (string, bool)
func (ObjectsExpiredPayload) MIME ¶
func (p ObjectsExpiredPayload) MIME() string
func (ObjectsExpiredPayload) SetContentTypeHeaderReq ¶
func (p ObjectsExpiredPayload) SetContentTypeHeaderReq(r *http.Request)
type ObjectsExpiredStatusResponse ¶
type ObjectsExpiredStatusResponse struct {
DeletionOngoing bool `json:"deletion_ongoing"`
}
func (ObjectsExpiredStatusResponse) CheckContentTypeHeaderReq ¶
func (p ObjectsExpiredStatusResponse) CheckContentTypeHeaderReq(r *http.Request) (string, bool)
func (ObjectsExpiredStatusResponse) MIME ¶
func (p ObjectsExpiredStatusResponse) MIME() string
func (ObjectsExpiredStatusResponse) SetContentTypeHeader ¶
func (p ObjectsExpiredStatusResponse) SetContentTypeHeader(w http.ResponseWriter)
func (ObjectsExpiredStatusResponse) SetContentTypeHeaderReq ¶
func (p ObjectsExpiredStatusResponse) SetContentTypeHeaderReq(r *http.Request)
Click to show internal directories.
Click to hide internal directories.