mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
drivers: use consts for task handle version
This commit is contained in:
@@ -21,7 +21,16 @@ import (
|
||||
"github.com/zclconf/go-cty/cty/msgpack"
|
||||
)
|
||||
|
||||
const DriverHealthy = "Healthy"
|
||||
const (
|
||||
// DriverHealthy is the default health description that should be used
|
||||
// if the driver is nominal
|
||||
DriverHealthy = "Healthy"
|
||||
|
||||
// Pre09TaskHandleVersion is the version used to identify that the task
|
||||
// handle is from a driver that existed before driver plugins (v0.9). The
|
||||
// driver should take appropriate action to handle the old driver state.
|
||||
Pre09TaskHandleVersion = 0
|
||||
)
|
||||
|
||||
// DriverPlugin is the interface with drivers will implement. It is also
|
||||
// implemented by a plugin client which proxies the calls to go-plugin. See
|
||||
|
||||
@@ -448,7 +448,8 @@ enum TaskState {
|
||||
// TaskHandle is created when starting a task and is used to recover task
|
||||
message TaskHandle {
|
||||
|
||||
// Version is used by the driver to version the DriverState schema
|
||||
// Version is used by the driver to version the DriverState schema.
|
||||
// Version 0 is reserved by Nomad and should not be used.
|
||||
int32 version = 1;
|
||||
|
||||
// Config is the TaskConfig for the task
|
||||
|
||||
Reference in New Issue
Block a user