open-nomad/client/allocrunnerv2/config.go
2018-10-16 16:53:29 -07:00

31 lines
822 B
Go

package allocrunnerv2
import (
"github.com/boltdb/bolt"
log "github.com/hashicorp/go-hclog"
clientconfig "github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/client/vaultclient"
"github.com/hashicorp/nomad/nomad/structs"
)
// Config holds the configuration for creating an allocation runner.
type Config struct {
// Logger is the logger for the allocation runner.
Logger log.Logger
// ClientConfig is the clients configuration.
ClientConfig *clientconfig.Config
// Alloc captures the allocation that should be run.
Alloc *structs.Allocation
// StateDB is used to store and restore state.
StateDB *bolt.DB
// Vault is the Vault client to use to retrieve Vault tokens
Vault vaultclient.VaultClient
// XXX Can have a OnStateTransistion hook that we can use to update the
// server
}