mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-04 07:36:29 +00:00
5d8e60808d
Co-authored-by: Anbraten <anton@ju60.de>
29 lines
689 B
Go
29 lines
689 B
Go
package backend
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
)
|
|
|
|
// Engine defines a container orchestration backend and is used
|
|
// to create and manage container resources.
|
|
type Engine interface {
|
|
// Setup the pipeline environment.
|
|
Setup(context.Context, *Config) error
|
|
|
|
// Exec start the pipeline step.
|
|
Exec(context.Context, *Step) error
|
|
|
|
// Kill the pipeline step.
|
|
Kill(context.Context, *Step) error
|
|
|
|
// Wait for the pipeline step to complete and returns
|
|
// the completion results.
|
|
Wait(context.Context, *Step) (*State, error)
|
|
|
|
// Tail the pipeline step logs.
|
|
Tail(context.Context, *Step) (io.ReadCloser, error)
|
|
|
|
// Destroy the pipeline environment.
|
|
Destroy(context.Context, *Config) error
|
|
}
|