mirror of
https://codeberg.org/crowci/crow.git
synced 2025-08-07 20:23:03 +03:00
Rename engine
to backend
(#2950)
rename based on https://woodpecker-ci.org/docs/usage/terminiology --------- Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -24,9 +24,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/rs/zerolog/log"
|
||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"go.woodpecker-ci.org/woodpecker/v2/pipeline/backend/types"
|
||||
|
||||
"github.com/urfave/cli/v2"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/errors"
|
||||
@@ -101,8 +102,8 @@ func configFromCliContext(ctx context.Context) (*Config, error) {
|
||||
return nil, types.ErrNoCliContextFound
|
||||
}
|
||||
|
||||
// New returns a new Kubernetes Engine.
|
||||
func New(ctx context.Context) types.Engine {
|
||||
// New returns a new Kubernetes Backend.
|
||||
func New(ctx context.Context) types.Backend {
|
||||
return &kube{
|
||||
ctx: ctx,
|
||||
}
|
||||
@@ -117,7 +118,7 @@ func (e *kube) IsAvailable(context.Context) bool {
|
||||
return len(host) > 0
|
||||
}
|
||||
|
||||
func (e *kube) Load(context.Context) (*types.EngineInfo, error) {
|
||||
func (e *kube) Load(context.Context) (*types.BackendInfo, error) {
|
||||
config, err := configFromCliContext(e.ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -140,7 +141,7 @@ func (e *kube) Load(context.Context) (*types.EngineInfo, error) {
|
||||
|
||||
// TODO(2693): use info resp of kubeClient to define platform var
|
||||
e.goos = runtime.GOOS
|
||||
return &types.EngineInfo{
|
||||
return &types.BackendInfo{
|
||||
Platform: runtime.GOOS + "/" + runtime.GOARCH,
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user