1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-01-23 17:53:23 +02:00

30 lines
689 B
Go
Raw Normal View History

2017-03-05 18:56:08 +11:00
package backend
2018-04-01 11:34:01 -07:00
import (
"context"
"io"
)
2017-03-05 18:56:08 +11: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 11:34:01 -07:00
Setup(context.Context, *Config) error
2021-10-02 10:25:26 +02:00
// Exec start the pipeline step.
2018-04-01 11:34:01 -07:00
Exec(context.Context, *Step) error
2021-10-02 10:25:26 +02:00
2017-03-05 18:56:08 +11:00
// Kill the pipeline step.
2018-04-01 11:34:01 -07:00
Kill(context.Context, *Step) error
2021-10-02 10:25:26 +02:00
2017-03-05 18:56:08 +11:00
// Wait for the pipeline step to complete and returns
// the completion results.
2018-04-01 11:34:01 -07:00
Wait(context.Context, *Step) (*State, error)
2021-10-02 10:25:26 +02:00
2017-03-05 18:56:08 +11:00
// Tail the pipeline step logs.
2018-04-01 11:34:01 -07:00
Tail(context.Context, *Step) (io.ReadCloser, error)
2021-10-02 10:25:26 +02:00
2017-03-05 18:56:08 +11:00
// Destroy the pipeline environment.
2018-04-01 11:34:01 -07:00
Destroy(context.Context, *Config) error
2017-03-05 18:56:08 +11:00
}