Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventStorageBackend ¶
type EventStorageBackend interface { // Initialize initializes a backend storage service with local or remote // event hub. Initialize() error // Close shutdown backend event storage service or disconnect the event hub. Close() error // Name returns backend name. Name() string // SaveEvent append or update a event record to backend. SaveEvent(event *v1.Event, region string) error // ListEvent list all events created by this job. ListEvent(jobNamespace, jobName, uid string, from, to time.Time) ([]*dmo.Event, error) // ListLogs list log entries generated by the pod with namespaced name (uid is optional). ListLogs(namespace, name, uid string, maxLine int64, from, to time.Time) ([]string, error) }
EventStorageBackend provides a collection of abstract methods to interact with different storage backends, write/read events.
type ObjectStorageBackend ¶
type ObjectStorageBackend interface { // Initialize initializes a backend storage service with local or remote // database. Initialize() error // Close shutdown backend storage service. Close() error // Name returns backend name. Name() string // SavePod append or update a pod record to backend, region is optional. SavePod(pod *v1.Pod, defaultContainerName, region string) error // ListPods lists pods controlled by some job, region is optional. ListPods(ns, name, jobID string) ([]*dmo.Pod, error) // StopPod updates status of pod record as stopped. StopPod(ns, name, podID string) error // SaveJob append or update a job record to backend, region is optional. SaveJob(job metav1.Object, kind string, specs map[apiv1.ReplicaType]*apiv1.ReplicaSpec, jobStatus *apiv1.JobStatus, region string) error // GetJob retrieve a job from backend, region is optional. GetJob(ns, name, jobID, kind, region string) (*dmo.Job, error) // ListJobs lists those jobs who satisfied with query conditions. ListJobs(query *Query) ([]*dmo.Job, error) // StopJob updates status of job record as stooped. StopJob(ns, name, jobID, kind, region string) error // DeleteJob updates job as deleted from api-server, but not delete job record // from backend, region is optional. DeleteJob(ns, name, jobID, kind, region string) error }
ObjectStorageBackend provides a collection of abstract methods to interact with different storage backends, write/read pod and job objects.
type QueryPagination ¶
Click to show internal directories.
Click to hide internal directories.