2017-03-05 07:56:08 +00:00
|
|
|
package backend
|
|
|
|
|
2018-04-01 18:34:01 +00:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"io"
|
|
|
|
)
|
2017-03-05 07:56:08 +00:00
|
|
|
|
|
|
|
// Engine defines a container orchestration backend and is used
|
|
|
|
// to create and manage container resources.
|
|
|
|
type Engine interface {
|
|
|
|
// Setup the pipeline environment.
|
2018-04-01 18:34:01 +00:00
|
|
|
Setup(context.Context, *Config) error
|
2021-10-02 08:25:26 +00:00
|
|
|
|
2021-10-03 13:07:39 +00:00
|
|
|
// Exec start the pipeline step.
|
2018-04-01 18:34:01 +00:00
|
|
|
Exec(context.Context, *Step) error
|
2021-10-02 08:25:26 +00:00
|
|
|
|
2017-03-05 07:56:08 +00:00
|
|
|
// Kill the pipeline step.
|
2018-04-01 18:34:01 +00:00
|
|
|
Kill(context.Context, *Step) error
|
2021-10-02 08:25:26 +00:00
|
|
|
|
2017-03-05 07:56:08 +00:00
|
|
|
// Wait for the pipeline step to complete and returns
|
|
|
|
// the completion results.
|
2018-04-01 18:34:01 +00:00
|
|
|
Wait(context.Context, *Step) (*State, error)
|
2021-10-02 08:25:26 +00:00
|
|
|
|
2017-03-05 07:56:08 +00:00
|
|
|
// Tail the pipeline step logs.
|
2018-04-01 18:34:01 +00:00
|
|
|
Tail(context.Context, *Step) (io.ReadCloser, error)
|
2021-10-02 08:25:26 +00:00
|
|
|
|
2017-03-05 07:56:08 +00:00
|
|
|
// Destroy the pipeline environment.
|
2018-04-01 18:34:01 +00:00
|
|
|
Destroy(context.Context, *Config) error
|
2017-03-05 07:56:08 +00:00
|
|
|
}
|