engine: task naming consistency

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-12-22 16:19:40 +01:00
parent 3e5ce6df26
commit d82baa4c2d
7 changed files with 50 additions and 34 deletions

View File

@@ -11,13 +11,13 @@ import (
)
func init() {
Register("LocalDirectory", func() Task { return &localDirectoryTask{} })
Register("InputDirectory", func() Task { return &inputDirectoryTask{} })
}
type localDirectoryTask struct {
type inputDirectoryTask struct {
}
func (c localDirectoryTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (c *inputDirectoryTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
var dir struct {
Path string
Include []string

View File

@@ -12,13 +12,13 @@ import (
)
func init() {
Register("SecretEnv", func() Task { return &secretEnvTask{} })
Register("InputSecretEnv", func() Task { return &inputSecretEnvTask{} })
}
type secretEnvTask struct {
type inputSecretEnvTask struct {
}
func (c secretEnvTask) Run(ctx context.Context, pctx *plancontext.Context, _ solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (c *inputSecretEnvTask) Run(ctx context.Context, pctx *plancontext.Context, _ solver.Solver, v *compiler.Value) (*compiler.Value, error) {
lg := log.Ctx(ctx)
var secretEnv struct {

View File

@@ -12,13 +12,13 @@ import (
)
func init() {
Register("SecretExec", func() Task { return &secretExecTask{} })
Register("InputSecretExec", func() Task { return &inputSecretExecTask{} })
}
type secretExecTask struct {
type inputSecretExecTask struct {
}
func (c secretExecTask) Run(ctx context.Context, pctx *plancontext.Context, _ solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (c *inputSecretExecTask) Run(ctx context.Context, pctx *plancontext.Context, _ solver.Solver, v *compiler.Value) (*compiler.Value, error) {
var secretExec struct {
Command struct {
Name string

View File

@@ -11,13 +11,13 @@ import (
)
func init() {
Register("SecretFile", func() Task { return &secretFileTask{} })
Register("InputSecretFile", func() Task { return &inputSecretFileTask{} })
}
type secretFileTask struct {
type inputSecretFileTask struct {
}
func (c secretFileTask) Run(ctx context.Context, pctx *plancontext.Context, _ solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (c *inputSecretFileTask) Run(ctx context.Context, pctx *plancontext.Context, _ solver.Solver, v *compiler.Value) (*compiler.Value, error) {
lg := log.Ctx(ctx)
var secretFile struct {

View File

@@ -18,7 +18,7 @@ func init() {
type pipelineTask struct {
}
func (c pipelineTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (c *pipelineTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
p := environment.NewPipeline(v, s, pctx)
if err := p.Run(ctx); err != nil {
return nil, err

View File

@@ -12,13 +12,13 @@ import (
)
func init() {
Register("Service", func() Task { return &serviceTask{} })
Register("ProxyEndpoint", func() Task { return &proxyEndpointTask{} })
}
type serviceTask struct {
type proxyEndpointTask struct {
}
func (c serviceTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (c *proxyEndpointTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
var unix, npipe string
var stringErr error