Documentation ¶
Index ¶
- func ContainerInfo(ctx context.Context, id string) (drmaa2interface.JobInfo, error)
- func CreateContainerSpec(jt drmaa2interface.JobTemplate) (*specgen.SpecGenerator, error)
- func DeleteContainer(ctx context.Context, id string) error
- func GetContainerState(ctx context.Context, id string) (drmaa2interface.JobState, string, error)
- func ListContainerImages(ctx context.Context) ([]string, error)
- func ListPodmanContainers(ctx context.Context) ([]string, error)
- func NewAllocator() *allocator
- func PauseContainer(ctx context.Context, id string) error
- func ResumeContainer(ctx context.Context, id string) error
- func RunPodmanContainer(ctx context.Context, jt drmaa2interface.JobTemplate, disablePull bool) (string, error)
- func TerminateContainer(ctx context.Context, id string) error
- type PodmanTracker
- func (p *PodmanTracker) AddArrayJob(jt drmaa2interface.JobTemplate, begin int, end int, step int, maxParallel int) (string, error)
- func (p *PodmanTracker) AddJob(template drmaa2interface.JobTemplate) (string, error)
- func (p *PodmanTracker) DeleteJob(jobid string) error
- func (p *PodmanTracker) JobControl(jobid, action string) error
- func (p *PodmanTracker) JobInfo(jobid string) (drmaa2interface.JobInfo, error)
- func (p *PodmanTracker) JobState(jobid string) (drmaa2interface.JobState, string, error)
- func (p *PodmanTracker) ListArrayJobs(arrayjobid string) ([]string, error)
- func (p *PodmanTracker) ListJobCategories() ([]string, error)
- func (p *PodmanTracker) ListJobs() ([]string, error)
- func (p *PodmanTracker) Wait(jobid string, timeout time.Duration, states ...drmaa2interface.JobState) error
- type PodmanTrackerParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerInfo ¶
func CreateContainerSpec ¶
func CreateContainerSpec(jt drmaa2interface.JobTemplate) (*specgen.SpecGenerator, error)
func GetContainerState ¶
func NewAllocator ¶
func NewAllocator() *allocator
func RunPodmanContainer ¶
func RunPodmanContainer(ctx context.Context, jt drmaa2interface.JobTemplate, disablePull bool) (string, error)
RunPodmanContainer converts a DRMAA2 job template into a container spec and runs the container with podman.
The context must provide the podman connection: ctx.Value(clientKey).(*Connection)
Types ¶
type PodmanTracker ¶
type PodmanTracker struct {
// contains filtered or unexported fields
}
PodmanTracker implements the JobTracker interface for managing containers as jobs.
func New ¶
func New(jobSessionName string, params PodmanTrackerParams) (*PodmanTracker, error)
New creates a new connection to Podman and returns a JobTracker interface for Podman. If connectionURIOverride is set it uses this URI for the new Podman connection otherwise the connection is established through the socket.
According to Podman:
"A valid URI connection should be scheme:// For example tcp://localhost:<port> or unix:///run/podman/podman.sock or ssh://<user>@<host>[:port]/run/podman/podman.sock?secure=True"
func (*PodmanTracker) AddArrayJob ¶
func (p *PodmanTracker) AddArrayJob(jt drmaa2interface.JobTemplate, begin int, end int, step int, maxParallel int) (string, error)
func (*PodmanTracker) AddJob ¶
func (p *PodmanTracker) AddJob(template drmaa2interface.JobTemplate) (string, error)
func (*PodmanTracker) DeleteJob ¶
func (p *PodmanTracker) DeleteJob(jobid string) error
DeleteJob removes the container and its volumes from the node. The container must be in an end state (i.e. not running anymore).
func (*PodmanTracker) JobControl ¶
func (p *PodmanTracker) JobControl(jobid, action string) error
func (*PodmanTracker) JobInfo ¶
func (p *PodmanTracker) JobInfo(jobid string) (drmaa2interface.JobInfo, error)
func (*PodmanTracker) JobState ¶
func (p *PodmanTracker) JobState(jobid string) (drmaa2interface.JobState, string, error)
func (*PodmanTracker) ListArrayJobs ¶
func (p *PodmanTracker) ListArrayJobs(arrayjobid string) ([]string, error)
func (*PodmanTracker) ListJobCategories ¶
func (p *PodmanTracker) ListJobCategories() ([]string, error)
ListJobCategories returns all localy available container images which can be used in JobCategory of the JobTemplate.
func (*PodmanTracker) ListJobs ¶
func (p *PodmanTracker) ListJobs() ([]string, error)
func (*PodmanTracker) Wait ¶
func (p *PodmanTracker) Wait(jobid string, timeout time.Duration, states ...drmaa2interface.JobState) error
Wait until the job has a certain DRMAA2 state or return an error if the state is unreachable.
type PodmanTrackerParams ¶
PodmanTrackerParams provide parameters which can be passed to the SessionManager in order to influence the behviour of podman.