drivers: Create drivers/shared/structs

This creates a drivers/shared/structs package and moves the buffer size
checks into it.
This commit is contained in:
Danielle Tomlinson
2018-11-28 17:29:57 +01:00
parent d2136e0aa7
commit 23197ec6b4
5 changed files with 19 additions and 19 deletions

View File

@@ -23,8 +23,8 @@ import (
shelpers "github.com/hashicorp/nomad/helper/stats"
"github.com/hashicorp/consul-template/signals"
dstructs "github.com/hashicorp/nomad/client/driver/structs"
cstructs "github.com/hashicorp/nomad/client/structs"
dstructs "github.com/hashicorp/nomad/drivers/shared/structs"
)
const (
@@ -310,7 +310,7 @@ func (e *UniversalExecutor) Exec(deadline time.Time, name string, args []string)
}
// ExecScript executes cmd with args and returns the output, exit code, and
// error. Output is truncated to client/driver/structs.CheckBufSize
// error. Output is truncated to drivers/shared/structs.CheckBufSize
func ExecScript(ctx context.Context, dir string, env []string, attrs *syscall.SysProcAttr,
name string, args []string) ([]byte, int, error) {
cmd := exec.CommandContext(ctx, name, args...)

View File

@@ -17,9 +17,9 @@ import (
"github.com/hashicorp/consul-template/signals"
hclog "github.com/hashicorp/go-hclog"
multierror "github.com/hashicorp/go-multierror"
dstructs "github.com/hashicorp/nomad/client/driver/structs"
"github.com/hashicorp/nomad/client/stats"
cstructs "github.com/hashicorp/nomad/client/structs"
dstructs "github.com/hashicorp/nomad/drivers/shared/structs"
"github.com/hashicorp/nomad/helper/discover"
shelpers "github.com/hashicorp/nomad/helper/stats"
"github.com/hashicorp/nomad/helper/uuid"