mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-09-27 06:00:10 +00:00
30 lines
672 B
Go
30 lines
672 B
Go
package types
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
)
|
|
|
|
// Engine defines a container orchestration backend and is used
|
|
// to create and manage container resources.
|
|
type Engine interface {
|
|
Name() string
|
|
IsAvailable() bool
|
|
Load() error
|
|
|
|
// Setup the pipeline environment.
|
|
Setup(context.Context, *Config) error
|
|
|
|
// Exec start the pipeline step.
|
|
Exec(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
|
|
}
|