Only build rkt driver on linux
Build stub for non-linux targets
This commit is contained in:
parent
bed56cbb1e
commit
a8a87af7ed
|
@ -1,3 +1,5 @@
|
|||
//+build linux
|
||||
|
||||
package driver
|
||||
|
||||
import (
|
||||
|
@ -225,7 +227,7 @@ func rktManifestMakePortMap(manifest *appcschema.PodManifest, configPortMap map[
|
|||
return portMap, nil
|
||||
}
|
||||
|
||||
// NewRktDriver is used to create a new exec driver
|
||||
// NewRktDriver is used to create a new rkt driver
|
||||
func NewRktDriver(ctx *DriverContext) Driver {
|
||||
return &RktDriver{DriverContext: *ctx}
|
||||
}
|
||||
|
|
55
client/driver/rkt_nonlinux.go
Normal file
55
client/driver/rkt_nonlinux.go
Normal file
|
@ -0,0 +1,55 @@
|
|||
//+build !linux
|
||||
|
||||
package driver
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/hashicorp/nomad/client/config"
|
||||
cstructs "github.com/hashicorp/nomad/client/structs"
|
||||
"github.com/hashicorp/nomad/nomad/structs"
|
||||
)
|
||||
|
||||
// NewRktDriver returns an unimplemented driver that returns false during
|
||||
// fingerprinting.
|
||||
func NewRktDriver(*DriverContext) Driver {
|
||||
return RktDriver{}
|
||||
}
|
||||
|
||||
type RktDriver struct{}
|
||||
|
||||
func (RktDriver) Prestart(*ExecContext, *structs.Task) (*PrestartResponse, error) {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (RktDriver) Start(ctx *ExecContext, task *structs.Task) (*StartResponse, error) {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (RktDriver) Open(ctx *ExecContext, handleID string) (DriverHandle, error) {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (RktDriver) Cleanup(*ExecContext, *CreatedResources) error {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (RktDriver) Validate(map[string]interface{}) error {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (RktDriver) Abilities() DriverAbilities {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (RktDriver) FSIsolation() cstructs.FSIsolation {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (RktDriver) Fingerprint(cfg *config.Config, node *structs.Node) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (RktDriver) Periodic() (bool, time.Duration) {
|
||||
return false, 0
|
||||
}
|
Loading…
Reference in a new issue