github.com/ferranbt/nomad@v0.9.3-0.20190607002617-85c449b7667c/devices/gpu/nvidia/cmd/main.go (about) 1 package main 2 3 import ( 4 log "github.com/hashicorp/go-hclog" 5 6 "github.com/hashicorp/nomad/devices/gpu/nvidia" 7 "github.com/hashicorp/nomad/plugins" 8 ) 9 10 func main() { 11 // Serve the plugin 12 plugins.Serve(factory) 13 } 14 15 // factory returns a new instance of the Nvidia GPU plugin 16 func factory(log log.Logger) interface{} { 17 return nvidia.NewNvidiaDevice(log) 18 }