From 59e5500de9d33ef6276166cedc46062df5963515 Mon Sep 17 00:00:00 2001 From: Nick Ethier Date: Mon, 13 Aug 2018 23:08:39 -0400 Subject: [PATCH] driver/base: Add initial protobuf spec --- plugins/drivers/base/proto/driver.pb.go | 2355 +++++++++++++++++++++++ plugins/drivers/base/proto/driver.proto | 403 ++++ 2 files changed, 2758 insertions(+) create mode 100644 plugins/drivers/base/proto/driver.pb.go create mode 100644 plugins/drivers/base/proto/driver.proto diff --git a/plugins/drivers/base/proto/driver.pb.go b/plugins/drivers/base/proto/driver.pb.go new file mode 100644 index 000000000..3ee262589 --- /dev/null +++ b/plugins/drivers/base/proto/driver.pb.go @@ -0,0 +1,2355 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: driver.proto + +package proto + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import duration "github.com/golang/protobuf/ptypes/duration" +import empty "github.com/golang/protobuf/ptypes/empty" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type TaskState int32 + +const ( + TaskState_TASK_UNKNOWN TaskState = 0 + TaskState_TASK_RUNNING TaskState = 1 + TaskState_TASK_EXITED TaskState = 2 +) + +var TaskState_name = map[int32]string{ + 0: "TASK_UNKNOWN", + 1: "TASK_RUNNING", + 2: "TASK_EXITED", +} +var TaskState_value = map[string]int32{ + "TASK_UNKNOWN": 0, + "TASK_RUNNING": 1, + "TASK_EXITED": 2, +} + +func (x TaskState) String() string { + return proto.EnumName(TaskState_name, int32(x)) +} +func (TaskState) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{0} +} + +type CPUUsage_Fields int32 + +const ( + CPUUsage_SYSTEM_MODE CPUUsage_Fields = 0 + CPUUsage_USER_MODE CPUUsage_Fields = 1 + CPUUsage_TOTAL_TICKS CPUUsage_Fields = 2 + CPUUsage_THROTTLED_PERIODS CPUUsage_Fields = 3 + CPUUsage_THROTTLED_TIME CPUUsage_Fields = 4 + CPUUsage_PERCENT CPUUsage_Fields = 5 +) + +var CPUUsage_Fields_name = map[int32]string{ + 0: "SYSTEM_MODE", + 1: "USER_MODE", + 2: "TOTAL_TICKS", + 3: "THROTTLED_PERIODS", + 4: "THROTTLED_TIME", + 5: "PERCENT", +} +var CPUUsage_Fields_value = map[string]int32{ + "SYSTEM_MODE": 0, + "USER_MODE": 1, + "TOTAL_TICKS": 2, + "THROTTLED_PERIODS": 3, + "THROTTLED_TIME": 4, + "PERCENT": 5, +} + +func (x CPUUsage_Fields) String() string { + return proto.EnumName(CPUUsage_Fields_name, int32(x)) +} +func (CPUUsage_Fields) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{27, 0} +} + +type MemoryUsage_Fields int32 + +const ( + MemoryUsage_RSS MemoryUsage_Fields = 0 + MemoryUsage_CACHE MemoryUsage_Fields = 1 + MemoryUsage_MAX_UASGE MemoryUsage_Fields = 2 + MemoryUsage_KERNEL_USAGE MemoryUsage_Fields = 3 + MemoryUsage_KERNEL_MAX_USAGE MemoryUsage_Fields = 4 +) + +var MemoryUsage_Fields_name = map[int32]string{ + 0: "RSS", + 1: "CACHE", + 2: "MAX_UASGE", + 3: "KERNEL_USAGE", + 4: "KERNEL_MAX_USAGE", +} +var MemoryUsage_Fields_value = map[string]int32{ + "RSS": 0, + "CACHE": 1, + "MAX_UASGE": 2, + "KERNEL_USAGE": 3, + "KERNEL_MAX_USAGE": 4, +} + +func (x MemoryUsage_Fields) String() string { + return proto.EnumName(MemoryUsage_Fields_name, int32(x)) +} +func (MemoryUsage_Fields) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{28, 0} +} + +type FingerprintResponse struct { + // Capabilities provides a way for the driver to denote if it implements + // non-core RPCs. Some Driver service RPCs expose additional information + // or functionality outside of the core task management functions. These + // RPCs are only implemented if the driver sets the corresponding capability. + Capabilities *DriverCapabilities `protobuf:"bytes,1,opt,name=capabilities,proto3" json:"capabilities,omitempty"` + // Attributes are key/value pairs that annotate the nomad client and can be + // used in scheduling contraints and affinities. + Attributes map[string]string `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Detected signifies if the necessary dependancies of the drive are met for + // nominal operation. + Detected bool `protobuf:"varint,3,opt,name=detected,proto3" json:"detected,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FingerprintResponse) Reset() { *m = FingerprintResponse{} } +func (m *FingerprintResponse) String() string { return proto.CompactTextString(m) } +func (*FingerprintResponse) ProtoMessage() {} +func (*FingerprintResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{0} +} +func (m *FingerprintResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_FingerprintResponse.Unmarshal(m, b) +} +func (m *FingerprintResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_FingerprintResponse.Marshal(b, m, deterministic) +} +func (dst *FingerprintResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_FingerprintResponse.Merge(dst, src) +} +func (m *FingerprintResponse) XXX_Size() int { + return xxx_messageInfo_FingerprintResponse.Size(m) +} +func (m *FingerprintResponse) XXX_DiscardUnknown() { + xxx_messageInfo_FingerprintResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_FingerprintResponse proto.InternalMessageInfo + +func (m *FingerprintResponse) GetCapabilities() *DriverCapabilities { + if m != nil { + return m.Capabilities + } + return nil +} + +func (m *FingerprintResponse) GetAttributes() map[string]string { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *FingerprintResponse) GetDetected() bool { + if m != nil { + return m.Detected + } + return false +} + +type RecoverTaskRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Handle is the TaskHandle returned from StartTask + Handle *TaskHandle `protobuf:"bytes,2,opt,name=handle,proto3" json:"handle,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RecoverTaskRequest) Reset() { *m = RecoverTaskRequest{} } +func (m *RecoverTaskRequest) String() string { return proto.CompactTextString(m) } +func (*RecoverTaskRequest) ProtoMessage() {} +func (*RecoverTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{1} +} +func (m *RecoverTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RecoverTaskRequest.Unmarshal(m, b) +} +func (m *RecoverTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RecoverTaskRequest.Marshal(b, m, deterministic) +} +func (dst *RecoverTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RecoverTaskRequest.Merge(dst, src) +} +func (m *RecoverTaskRequest) XXX_Size() int { + return xxx_messageInfo_RecoverTaskRequest.Size(m) +} +func (m *RecoverTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RecoverTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RecoverTaskRequest proto.InternalMessageInfo + +func (m *RecoverTaskRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +func (m *RecoverTaskRequest) GetHandle() *TaskHandle { + if m != nil { + return m.Handle + } + return nil +} + +type StartTaskRequest struct { + // Task configuration to launch + Task *TaskConfig `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StartTaskRequest) Reset() { *m = StartTaskRequest{} } +func (m *StartTaskRequest) String() string { return proto.CompactTextString(m) } +func (*StartTaskRequest) ProtoMessage() {} +func (*StartTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{2} +} +func (m *StartTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StartTaskRequest.Unmarshal(m, b) +} +func (m *StartTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StartTaskRequest.Marshal(b, m, deterministic) +} +func (dst *StartTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartTaskRequest.Merge(dst, src) +} +func (m *StartTaskRequest) XXX_Size() int { + return xxx_messageInfo_StartTaskRequest.Size(m) +} +func (m *StartTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StartTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_StartTaskRequest proto.InternalMessageInfo + +func (m *StartTaskRequest) GetTask() *TaskConfig { + if m != nil { + return m.Task + } + return nil +} + +type StartTaskResponse struct { + // Handle is opague to the client, but must be stored in order to potentially + // recover the task. + Handle *TaskHandle `protobuf:"bytes,1,opt,name=handle,proto3" json:"handle,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StartTaskResponse) Reset() { *m = StartTaskResponse{} } +func (m *StartTaskResponse) String() string { return proto.CompactTextString(m) } +func (*StartTaskResponse) ProtoMessage() {} +func (*StartTaskResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{3} +} +func (m *StartTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StartTaskResponse.Unmarshal(m, b) +} +func (m *StartTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StartTaskResponse.Marshal(b, m, deterministic) +} +func (dst *StartTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_StartTaskResponse.Merge(dst, src) +} +func (m *StartTaskResponse) XXX_Size() int { + return xxx_messageInfo_StartTaskResponse.Size(m) +} +func (m *StartTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_StartTaskResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_StartTaskResponse proto.InternalMessageInfo + +func (m *StartTaskResponse) GetHandle() *TaskHandle { + if m != nil { + return m.Handle + } + return nil +} + +type WaitTaskRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WaitTaskRequest) Reset() { *m = WaitTaskRequest{} } +func (m *WaitTaskRequest) String() string { return proto.CompactTextString(m) } +func (*WaitTaskRequest) ProtoMessage() {} +func (*WaitTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{4} +} +func (m *WaitTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WaitTaskRequest.Unmarshal(m, b) +} +func (m *WaitTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WaitTaskRequest.Marshal(b, m, deterministic) +} +func (dst *WaitTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_WaitTaskRequest.Merge(dst, src) +} +func (m *WaitTaskRequest) XXX_Size() int { + return xxx_messageInfo_WaitTaskRequest.Size(m) +} +func (m *WaitTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_WaitTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_WaitTaskRequest proto.InternalMessageInfo + +func (m *WaitTaskRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +type WaitTaskResponse struct { + // ExitCode returned from the task on exit + ExitCode int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + // Signal is set if a signal was sent to the task + Signal int32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"` + // Err is set if any driver error occured while waiting for the task + Err string `protobuf:"bytes,3,opt,name=err,proto3" json:"err,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *WaitTaskResponse) Reset() { *m = WaitTaskResponse{} } +func (m *WaitTaskResponse) String() string { return proto.CompactTextString(m) } +func (*WaitTaskResponse) ProtoMessage() {} +func (*WaitTaskResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{5} +} +func (m *WaitTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WaitTaskResponse.Unmarshal(m, b) +} +func (m *WaitTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WaitTaskResponse.Marshal(b, m, deterministic) +} +func (dst *WaitTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_WaitTaskResponse.Merge(dst, src) +} +func (m *WaitTaskResponse) XXX_Size() int { + return xxx_messageInfo_WaitTaskResponse.Size(m) +} +func (m *WaitTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_WaitTaskResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_WaitTaskResponse proto.InternalMessageInfo + +func (m *WaitTaskResponse) GetExitCode() int32 { + if m != nil { + return m.ExitCode + } + return 0 +} + +func (m *WaitTaskResponse) GetSignal() int32 { + if m != nil { + return m.Signal + } + return 0 +} + +func (m *WaitTaskResponse) GetErr() string { + if m != nil { + return m.Err + } + return "" +} + +type StopTaskRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Timeout defines the amount of time to wait before forcefully killing + // the task. For example, on Unix clients, this means sending a SIGKILL to + // the process. + Timeout *duration.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" json:"timeout,omitempty"` + // Signal can be set to override the Task's configured shutdown signal + Signal string `protobuf:"bytes,3,opt,name=signal,proto3" json:"signal,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *StopTaskRequest) Reset() { *m = StopTaskRequest{} } +func (m *StopTaskRequest) String() string { return proto.CompactTextString(m) } +func (*StopTaskRequest) ProtoMessage() {} +func (*StopTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{6} +} +func (m *StopTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_StopTaskRequest.Unmarshal(m, b) +} +func (m *StopTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_StopTaskRequest.Marshal(b, m, deterministic) +} +func (dst *StopTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_StopTaskRequest.Merge(dst, src) +} +func (m *StopTaskRequest) XXX_Size() int { + return xxx_messageInfo_StopTaskRequest.Size(m) +} +func (m *StopTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_StopTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_StopTaskRequest proto.InternalMessageInfo + +func (m *StopTaskRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +func (m *StopTaskRequest) GetTimeout() *duration.Duration { + if m != nil { + return m.Timeout + } + return nil +} + +func (m *StopTaskRequest) GetSignal() string { + if m != nil { + return m.Signal + } + return "" +} + +type DestroyTaskRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DestroyTaskRequest) Reset() { *m = DestroyTaskRequest{} } +func (m *DestroyTaskRequest) String() string { return proto.CompactTextString(m) } +func (*DestroyTaskRequest) ProtoMessage() {} +func (*DestroyTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{7} +} +func (m *DestroyTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DestroyTaskRequest.Unmarshal(m, b) +} +func (m *DestroyTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DestroyTaskRequest.Marshal(b, m, deterministic) +} +func (dst *DestroyTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DestroyTaskRequest.Merge(dst, src) +} +func (m *DestroyTaskRequest) XXX_Size() int { + return xxx_messageInfo_DestroyTaskRequest.Size(m) +} +func (m *DestroyTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DestroyTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DestroyTaskRequest proto.InternalMessageInfo + +func (m *DestroyTaskRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +type ListTasksRequest struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} } +func (m *ListTasksRequest) String() string { return proto.CompactTextString(m) } +func (*ListTasksRequest) ProtoMessage() {} +func (*ListTasksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{8} +} +func (m *ListTasksRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListTasksRequest.Unmarshal(m, b) +} +func (m *ListTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListTasksRequest.Marshal(b, m, deterministic) +} +func (dst *ListTasksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListTasksRequest.Merge(dst, src) +} +func (m *ListTasksRequest) XXX_Size() int { + return xxx_messageInfo_ListTasksRequest.Size(m) +} +func (m *ListTasksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListTasksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListTasksRequest proto.InternalMessageInfo + +type ListTasksResponse struct { + // Tasks includes a list of summary information for each task + Tasks []*TaskSummary `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} } +func (m *ListTasksResponse) String() string { return proto.CompactTextString(m) } +func (*ListTasksResponse) ProtoMessage() {} +func (*ListTasksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{9} +} +func (m *ListTasksResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListTasksResponse.Unmarshal(m, b) +} +func (m *ListTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListTasksResponse.Marshal(b, m, deterministic) +} +func (dst *ListTasksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListTasksResponse.Merge(dst, src) +} +func (m *ListTasksResponse) XXX_Size() int { + return xxx_messageInfo_ListTasksResponse.Size(m) +} +func (m *ListTasksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListTasksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListTasksResponse proto.InternalMessageInfo + +func (m *ListTasksResponse) GetTasks() []*TaskSummary { + if m != nil { + return m.Tasks + } + return nil +} + +type InspectTaskRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InspectTaskRequest) Reset() { *m = InspectTaskRequest{} } +func (m *InspectTaskRequest) String() string { return proto.CompactTextString(m) } +func (*InspectTaskRequest) ProtoMessage() {} +func (*InspectTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{10} +} +func (m *InspectTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InspectTaskRequest.Unmarshal(m, b) +} +func (m *InspectTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InspectTaskRequest.Marshal(b, m, deterministic) +} +func (dst *InspectTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_InspectTaskRequest.Merge(dst, src) +} +func (m *InspectTaskRequest) XXX_Size() int { + return xxx_messageInfo_InspectTaskRequest.Size(m) +} +func (m *InspectTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_InspectTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_InspectTaskRequest proto.InternalMessageInfo + +func (m *InspectTaskRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +type InspectTaskResponse struct { + // Task details + Task *TaskStatus `protobuf:"bytes,1,opt,name=task,proto3" json:"task,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *InspectTaskResponse) Reset() { *m = InspectTaskResponse{} } +func (m *InspectTaskResponse) String() string { return proto.CompactTextString(m) } +func (*InspectTaskResponse) ProtoMessage() {} +func (*InspectTaskResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{11} +} +func (m *InspectTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_InspectTaskResponse.Unmarshal(m, b) +} +func (m *InspectTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_InspectTaskResponse.Marshal(b, m, deterministic) +} +func (dst *InspectTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_InspectTaskResponse.Merge(dst, src) +} +func (m *InspectTaskResponse) XXX_Size() int { + return xxx_messageInfo_InspectTaskResponse.Size(m) +} +func (m *InspectTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_InspectTaskResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_InspectTaskResponse proto.InternalMessageInfo + +func (m *InspectTaskResponse) GetTask() *TaskStatus { + if m != nil { + return m.Task + } + return nil +} + +type TaskStatsRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskStatsRequest) Reset() { *m = TaskStatsRequest{} } +func (m *TaskStatsRequest) String() string { return proto.CompactTextString(m) } +func (*TaskStatsRequest) ProtoMessage() {} +func (*TaskStatsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{12} +} +func (m *TaskStatsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskStatsRequest.Unmarshal(m, b) +} +func (m *TaskStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskStatsRequest.Marshal(b, m, deterministic) +} +func (dst *TaskStatsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskStatsRequest.Merge(dst, src) +} +func (m *TaskStatsRequest) XXX_Size() int { + return xxx_messageInfo_TaskStatsRequest.Size(m) +} +func (m *TaskStatsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TaskStatsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskStatsRequest proto.InternalMessageInfo + +func (m *TaskStatsRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +type TaskStatsResponse struct { + // Stats for the task + Stats *TaskStats `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskStatsResponse) Reset() { *m = TaskStatsResponse{} } +func (m *TaskStatsResponse) String() string { return proto.CompactTextString(m) } +func (*TaskStatsResponse) ProtoMessage() {} +func (*TaskStatsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{13} +} +func (m *TaskStatsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskStatsResponse.Unmarshal(m, b) +} +func (m *TaskStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskStatsResponse.Marshal(b, m, deterministic) +} +func (dst *TaskStatsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskStatsResponse.Merge(dst, src) +} +func (m *TaskStatsResponse) XXX_Size() int { + return xxx_messageInfo_TaskStatsResponse.Size(m) +} +func (m *TaskStatsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TaskStatsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskStatsResponse proto.InternalMessageInfo + +func (m *TaskStatsResponse) GetStats() *TaskStats { + if m != nil { + return m.Stats + } + return nil +} + +type SignalTaskRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Signal is the operating system signal to send to the task. Ex: SIGHUP + Signal string `protobuf:"bytes,2,opt,name=signal,proto3" json:"signal,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SignalTaskRequest) Reset() { *m = SignalTaskRequest{} } +func (m *SignalTaskRequest) String() string { return proto.CompactTextString(m) } +func (*SignalTaskRequest) ProtoMessage() {} +func (*SignalTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{14} +} +func (m *SignalTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SignalTaskRequest.Unmarshal(m, b) +} +func (m *SignalTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SignalTaskRequest.Marshal(b, m, deterministic) +} +func (dst *SignalTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SignalTaskRequest.Merge(dst, src) +} +func (m *SignalTaskRequest) XXX_Size() int { + return xxx_messageInfo_SignalTaskRequest.Size(m) +} +func (m *SignalTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SignalTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SignalTaskRequest proto.InternalMessageInfo + +func (m *SignalTaskRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +func (m *SignalTaskRequest) GetSignal() string { + if m != nil { + return m.Signal + } + return "" +} + +type ExecTaskRequest struct { + // TaskId is the ID of the target task + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // Command is the command to execute in the task environment + Command []string `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"` + // Timeout is the amount of time to wait for the command to stop. + // Defaults to 0 (run forever) + Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExecTaskRequest) Reset() { *m = ExecTaskRequest{} } +func (m *ExecTaskRequest) String() string { return proto.CompactTextString(m) } +func (*ExecTaskRequest) ProtoMessage() {} +func (*ExecTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{15} +} +func (m *ExecTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExecTaskRequest.Unmarshal(m, b) +} +func (m *ExecTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExecTaskRequest.Marshal(b, m, deterministic) +} +func (dst *ExecTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecTaskRequest.Merge(dst, src) +} +func (m *ExecTaskRequest) XXX_Size() int { + return xxx_messageInfo_ExecTaskRequest.Size(m) +} +func (m *ExecTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExecTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecTaskRequest proto.InternalMessageInfo + +func (m *ExecTaskRequest) GetTaskId() string { + if m != nil { + return m.TaskId + } + return "" +} + +func (m *ExecTaskRequest) GetCommand() []string { + if m != nil { + return m.Command + } + return nil +} + +func (m *ExecTaskRequest) GetTimeout() *duration.Duration { + if m != nil { + return m.Timeout + } + return nil +} + +type ExecTaskResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ExecTaskResponse) Reset() { *m = ExecTaskResponse{} } +func (m *ExecTaskResponse) String() string { return proto.CompactTextString(m) } +func (*ExecTaskResponse) ProtoMessage() {} +func (*ExecTaskResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{16} +} +func (m *ExecTaskResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ExecTaskResponse.Unmarshal(m, b) +} +func (m *ExecTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ExecTaskResponse.Marshal(b, m, deterministic) +} +func (dst *ExecTaskResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecTaskResponse.Merge(dst, src) +} +func (m *ExecTaskResponse) XXX_Size() int { + return xxx_messageInfo_ExecTaskResponse.Size(m) +} +func (m *ExecTaskResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ExecTaskResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecTaskResponse proto.InternalMessageInfo + +type DriverCapabilities struct { + // SendSignals indicates that the driver can send process signals (ex. SIGUSR1) + // to the task. + SendSignals bool `protobuf:"varint,1,opt,name=send_signals,json=sendSignals,proto3" json:"send_signals,omitempty"` + // Exec indicates that the driver supports executing arbitrary commands + // in the task's execution environment. + Exec bool `protobuf:"varint,2,opt,name=exec,proto3" json:"exec,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DriverCapabilities) Reset() { *m = DriverCapabilities{} } +func (m *DriverCapabilities) String() string { return proto.CompactTextString(m) } +func (*DriverCapabilities) ProtoMessage() {} +func (*DriverCapabilities) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{17} +} +func (m *DriverCapabilities) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DriverCapabilities.Unmarshal(m, b) +} +func (m *DriverCapabilities) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DriverCapabilities.Marshal(b, m, deterministic) +} +func (dst *DriverCapabilities) XXX_Merge(src proto.Message) { + xxx_messageInfo_DriverCapabilities.Merge(dst, src) +} +func (m *DriverCapabilities) XXX_Size() int { + return xxx_messageInfo_DriverCapabilities.Size(m) +} +func (m *DriverCapabilities) XXX_DiscardUnknown() { + xxx_messageInfo_DriverCapabilities.DiscardUnknown(m) +} + +var xxx_messageInfo_DriverCapabilities proto.InternalMessageInfo + +func (m *DriverCapabilities) GetSendSignals() bool { + if m != nil { + return m.SendSignals + } + return false +} + +func (m *DriverCapabilities) GetExec() bool { + if m != nil { + return m.Exec + } + return false +} + +type TaskConfig struct { + // Id of the task, recommended to the globally unique, must be unique to the driver. + // If not set, a UUID is to be generated. + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Name of the task + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // MsgpackDriverConfig is the encoded driver configuation of the task + MsgpackDriverConfig []byte `protobuf:"bytes,3,opt,name=msgpack_driver_config,json=msgpackDriverConfig,proto3" json:"msgpack_driver_config,omitempty"` + // Env is the a set of key/value pairs to be set as environment variables + Env map[string]string `protobuf:"bytes,4,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Resources defines the resources to isolate + Resources *Resources `protobuf:"bytes,5,opt,name=resources,proto3" json:"resources,omitempty"` + // Mounts is a list of targets to bind mount into the task directory + Mounts []*Mount `protobuf:"bytes,6,rep,name=mounts,proto3" json:"mounts,omitempty"` + // Devices is a list of system devices to mount into the task's execution + // environment. + Devices []*Device `protobuf:"bytes,7,rep,name=devices,proto3" json:"devices,omitempty"` + // User defines the operating system user the tasks should run as + User string `protobuf:"bytes,8,opt,name=user,proto3" json:"user,omitempty"` + // AllocDir is the directory on the host where the allocation directory + // exists. + AllocDir string `protobuf:"bytes,9,opt,name=alloc_dir,json=allocDir,proto3" json:"alloc_dir,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskConfig) Reset() { *m = TaskConfig{} } +func (m *TaskConfig) String() string { return proto.CompactTextString(m) } +func (*TaskConfig) ProtoMessage() {} +func (*TaskConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{18} +} +func (m *TaskConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskConfig.Unmarshal(m, b) +} +func (m *TaskConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskConfig.Marshal(b, m, deterministic) +} +func (dst *TaskConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskConfig.Merge(dst, src) +} +func (m *TaskConfig) XXX_Size() int { + return xxx_messageInfo_TaskConfig.Size(m) +} +func (m *TaskConfig) XXX_DiscardUnknown() { + xxx_messageInfo_TaskConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskConfig proto.InternalMessageInfo + +func (m *TaskConfig) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *TaskConfig) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *TaskConfig) GetMsgpackDriverConfig() []byte { + if m != nil { + return m.MsgpackDriverConfig + } + return nil +} + +func (m *TaskConfig) GetEnv() map[string]string { + if m != nil { + return m.Env + } + return nil +} + +func (m *TaskConfig) GetResources() *Resources { + if m != nil { + return m.Resources + } + return nil +} + +func (m *TaskConfig) GetMounts() []*Mount { + if m != nil { + return m.Mounts + } + return nil +} + +func (m *TaskConfig) GetDevices() []*Device { + if m != nil { + return m.Devices + } + return nil +} + +func (m *TaskConfig) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *TaskConfig) GetAllocDir() string { + if m != nil { + return m.AllocDir + } + return "" +} + +type Resources struct { + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified) + CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"` + // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified) + CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"` + // CPU shares (relative weight vs. other containers). Default: 0 (not specified) + CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"` + // Memory limit in bytes. Default: 0 (not specified) + MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` + // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified) + OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"` + // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified) + CpusetCpus string `protobuf:"bytes,6,opt,name=cpuset_cpus,json=cpusetCpus,proto3" json:"cpuset_cpus,omitempty"` + // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified) + CpusetMems string `protobuf:"bytes,7,opt,name=cpuset_mems,json=cpusetMems,proto3" json:"cpuset_mems,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Resources) Reset() { *m = Resources{} } +func (m *Resources) String() string { return proto.CompactTextString(m) } +func (*Resources) ProtoMessage() {} +func (*Resources) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{19} +} +func (m *Resources) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Resources.Unmarshal(m, b) +} +func (m *Resources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Resources.Marshal(b, m, deterministic) +} +func (dst *Resources) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resources.Merge(dst, src) +} +func (m *Resources) XXX_Size() int { + return xxx_messageInfo_Resources.Size(m) +} +func (m *Resources) XXX_DiscardUnknown() { + xxx_messageInfo_Resources.DiscardUnknown(m) +} + +var xxx_messageInfo_Resources proto.InternalMessageInfo + +func (m *Resources) GetCpuPeriod() int64 { + if m != nil { + return m.CpuPeriod + } + return 0 +} + +func (m *Resources) GetCpuQuota() int64 { + if m != nil { + return m.CpuQuota + } + return 0 +} + +func (m *Resources) GetCpuShares() int64 { + if m != nil { + return m.CpuShares + } + return 0 +} + +func (m *Resources) GetMemoryLimitInBytes() int64 { + if m != nil { + return m.MemoryLimitInBytes + } + return 0 +} + +func (m *Resources) GetOomScoreAdj() int64 { + if m != nil { + return m.OomScoreAdj + } + return 0 +} + +func (m *Resources) GetCpusetCpus() string { + if m != nil { + return m.CpusetCpus + } + return "" +} + +func (m *Resources) GetCpusetMems() string { + if m != nil { + return m.CpusetMems + } + return "" +} + +type Mount struct { + // TaskPath is the file path within the task directory to mount to + TaskPath string `protobuf:"bytes,1,opt,name=task_path,json=taskPath,proto3" json:"task_path,omitempty"` + // HostPath is the file path on the host to mount from + HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` + // Readonly if set true, mounts the path in readonly mode + Readonly bool `protobuf:"varint,3,opt,name=readonly,proto3" json:"readonly,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Mount) Reset() { *m = Mount{} } +func (m *Mount) String() string { return proto.CompactTextString(m) } +func (*Mount) ProtoMessage() {} +func (*Mount) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{20} +} +func (m *Mount) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Mount.Unmarshal(m, b) +} +func (m *Mount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Mount.Marshal(b, m, deterministic) +} +func (dst *Mount) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mount.Merge(dst, src) +} +func (m *Mount) XXX_Size() int { + return xxx_messageInfo_Mount.Size(m) +} +func (m *Mount) XXX_DiscardUnknown() { + xxx_messageInfo_Mount.DiscardUnknown(m) +} + +var xxx_messageInfo_Mount proto.InternalMessageInfo + +func (m *Mount) GetTaskPath() string { + if m != nil { + return m.TaskPath + } + return "" +} + +func (m *Mount) GetHostPath() string { + if m != nil { + return m.HostPath + } + return "" +} + +func (m *Mount) GetReadonly() bool { + if m != nil { + return m.Readonly + } + return false +} + +type Device struct { + // TaskPath is the file path within the task to mount the device to + TaskPath string `protobuf:"bytes,1,opt,name=task_path,json=taskPath,proto3" json:"task_path,omitempty"` + // HostPath is the path on the host to the source device + HostPath string `protobuf:"bytes,2,opt,name=host_path,json=hostPath,proto3" json:"host_path,omitempty"` + // Permissions defines the Cgroup permissions of the device. + // One or more of the following options can be set: + // * r - allows the task to read from the specified device. + // * w - allows the task to write to the specified device. + // * m - allows the task to create device files that do not yet exist. + // + // Example: "rw" + Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Device) Reset() { *m = Device{} } +func (m *Device) String() string { return proto.CompactTextString(m) } +func (*Device) ProtoMessage() {} +func (*Device) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{21} +} +func (m *Device) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Device.Unmarshal(m, b) +} +func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Device.Marshal(b, m, deterministic) +} +func (dst *Device) XXX_Merge(src proto.Message) { + xxx_messageInfo_Device.Merge(dst, src) +} +func (m *Device) XXX_Size() int { + return xxx_messageInfo_Device.Size(m) +} +func (m *Device) XXX_DiscardUnknown() { + xxx_messageInfo_Device.DiscardUnknown(m) +} + +var xxx_messageInfo_Device proto.InternalMessageInfo + +func (m *Device) GetTaskPath() string { + if m != nil { + return m.TaskPath + } + return "" +} + +func (m *Device) GetHostPath() string { + if m != nil { + return m.HostPath + } + return "" +} + +func (m *Device) GetPermissions() string { + if m != nil { + return m.Permissions + } + return "" +} + +// TaskHandle is created when starting a task and is used to recover task +type TaskHandle struct { + // Driver is the driver which initially created the handle + Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"` + // Config is the TaskConfig for the task + Config *TaskConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"` + // State is the state of the task's execution + State TaskState `protobuf:"varint,3,opt,name=state,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.TaskState" json:"state,omitempty"` + // DriverState is the encoded state for the specific driver + DriverState []byte `protobuf:"bytes,4,opt,name=driver_state,json=driverState,proto3" json:"driver_state,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskHandle) Reset() { *m = TaskHandle{} } +func (m *TaskHandle) String() string { return proto.CompactTextString(m) } +func (*TaskHandle) ProtoMessage() {} +func (*TaskHandle) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{22} +} +func (m *TaskHandle) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskHandle.Unmarshal(m, b) +} +func (m *TaskHandle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskHandle.Marshal(b, m, deterministic) +} +func (dst *TaskHandle) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskHandle.Merge(dst, src) +} +func (m *TaskHandle) XXX_Size() int { + return xxx_messageInfo_TaskHandle.Size(m) +} +func (m *TaskHandle) XXX_DiscardUnknown() { + xxx_messageInfo_TaskHandle.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskHandle proto.InternalMessageInfo + +func (m *TaskHandle) GetDriver() string { + if m != nil { + return m.Driver + } + return "" +} + +func (m *TaskHandle) GetConfig() *TaskConfig { + if m != nil { + return m.Config + } + return nil +} + +func (m *TaskHandle) GetState() TaskState { + if m != nil { + return m.State + } + return TaskState_TASK_UNKNOWN +} + +func (m *TaskHandle) GetDriverState() []byte { + if m != nil { + return m.DriverState + } + return nil +} + +// TaskSummary defines summary information of a task, typically used when listing +// many tasks at once. +type TaskSummary struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // State is the state of the task's execution + State TaskState `protobuf:"varint,3,opt,name=state,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.TaskState" json:"state,omitempty"` + // StartedAt is the timestamp when the task was started + StartedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskSummary) Reset() { *m = TaskSummary{} } +func (m *TaskSummary) String() string { return proto.CompactTextString(m) } +func (*TaskSummary) ProtoMessage() {} +func (*TaskSummary) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{23} +} +func (m *TaskSummary) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskSummary.Unmarshal(m, b) +} +func (m *TaskSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskSummary.Marshal(b, m, deterministic) +} +func (dst *TaskSummary) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskSummary.Merge(dst, src) +} +func (m *TaskSummary) XXX_Size() int { + return xxx_messageInfo_TaskSummary.Size(m) +} +func (m *TaskSummary) XXX_DiscardUnknown() { + xxx_messageInfo_TaskSummary.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskSummary proto.InternalMessageInfo + +func (m *TaskSummary) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *TaskSummary) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *TaskSummary) GetState() TaskState { + if m != nil { + return m.State + } + return TaskState_TASK_UNKNOWN +} + +func (m *TaskSummary) GetStartedAt() *timestamp.Timestamp { + if m != nil { + return m.StartedAt + } + return nil +} + +// TaskStatus includes detailed information of a specific task +type TaskStatus struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // State is the state of the task's execution + State TaskState `protobuf:"varint,3,opt,name=state,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.TaskState" json:"state,omitempty"` + // StartedAt is the timestamp when the task was started + StartedAt *timestamp.Timestamp `protobuf:"bytes,4,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` + // CompletedAt is the timestamp when the task exited. + // If the task is still running, CompletedAt will not be set + CompletedAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` + // ExitCode should only be used when CompletedAt is set. + ExitCode int32 `protobuf:"varint,6,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` + // DriverStatus is a set of string/string key value pairs specific to the + // implementing driver. + DriverStatus map[string]string `protobuf:"bytes,7,rep,name=driver_status,json=driverStatus,proto3" json:"driver_status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskStatus) Reset() { *m = TaskStatus{} } +func (m *TaskStatus) String() string { return proto.CompactTextString(m) } +func (*TaskStatus) ProtoMessage() {} +func (*TaskStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{24} +} +func (m *TaskStatus) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskStatus.Unmarshal(m, b) +} +func (m *TaskStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskStatus.Marshal(b, m, deterministic) +} +func (dst *TaskStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskStatus.Merge(dst, src) +} +func (m *TaskStatus) XXX_Size() int { + return xxx_messageInfo_TaskStatus.Size(m) +} +func (m *TaskStatus) XXX_DiscardUnknown() { + xxx_messageInfo_TaskStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskStatus proto.InternalMessageInfo + +func (m *TaskStatus) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *TaskStatus) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *TaskStatus) GetState() TaskState { + if m != nil { + return m.State + } + return TaskState_TASK_UNKNOWN +} + +func (m *TaskStatus) GetStartedAt() *timestamp.Timestamp { + if m != nil { + return m.StartedAt + } + return nil +} + +func (m *TaskStatus) GetCompletedAt() *timestamp.Timestamp { + if m != nil { + return m.CompletedAt + } + return nil +} + +func (m *TaskStatus) GetExitCode() int32 { + if m != nil { + return m.ExitCode + } + return 0 +} + +func (m *TaskStatus) GetDriverStatus() map[string]string { + if m != nil { + return m.DriverStatus + } + return nil +} + +type TaskStats struct { + // Id of the task + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Timestamp for which the stats were collected + Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + // AggResourceUsage is the aggreate usage of all processes + AggResourceUsage *TaskResourceUsage `protobuf:"bytes,3,opt,name=agg_resource_usage,json=aggResourceUsage,proto3" json:"agg_resource_usage,omitempty"` + // ResourceUsageByPid breaks the usage stats by process + ResourceUsageByPid map[string]*TaskResourceUsage `protobuf:"bytes,4,rep,name=resource_usage_by_pid,json=resourceUsageByPid,proto3" json:"resource_usage_by_pid,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskStats) Reset() { *m = TaskStats{} } +func (m *TaskStats) String() string { return proto.CompactTextString(m) } +func (*TaskStats) ProtoMessage() {} +func (*TaskStats) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{25} +} +func (m *TaskStats) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskStats.Unmarshal(m, b) +} +func (m *TaskStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskStats.Marshal(b, m, deterministic) +} +func (dst *TaskStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskStats.Merge(dst, src) +} +func (m *TaskStats) XXX_Size() int { + return xxx_messageInfo_TaskStats.Size(m) +} +func (m *TaskStats) XXX_DiscardUnknown() { + xxx_messageInfo_TaskStats.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskStats proto.InternalMessageInfo + +func (m *TaskStats) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *TaskStats) GetTimestamp() *timestamp.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *TaskStats) GetAggResourceUsage() *TaskResourceUsage { + if m != nil { + return m.AggResourceUsage + } + return nil +} + +func (m *TaskStats) GetResourceUsageByPid() map[string]*TaskResourceUsage { + if m != nil { + return m.ResourceUsageByPid + } + return nil +} + +type TaskResourceUsage struct { + // CPU usage stats + Cpu *CPUUsage `protobuf:"bytes,1,opt,name=cpu,proto3" json:"cpu,omitempty"` + // Memory usage stats + Memory *MemoryUsage `protobuf:"bytes,2,opt,name=memory,proto3" json:"memory,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskResourceUsage) Reset() { *m = TaskResourceUsage{} } +func (m *TaskResourceUsage) String() string { return proto.CompactTextString(m) } +func (*TaskResourceUsage) ProtoMessage() {} +func (*TaskResourceUsage) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{26} +} +func (m *TaskResourceUsage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskResourceUsage.Unmarshal(m, b) +} +func (m *TaskResourceUsage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskResourceUsage.Marshal(b, m, deterministic) +} +func (dst *TaskResourceUsage) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskResourceUsage.Merge(dst, src) +} +func (m *TaskResourceUsage) XXX_Size() int { + return xxx_messageInfo_TaskResourceUsage.Size(m) +} +func (m *TaskResourceUsage) XXX_DiscardUnknown() { + xxx_messageInfo_TaskResourceUsage.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskResourceUsage proto.InternalMessageInfo + +func (m *TaskResourceUsage) GetCpu() *CPUUsage { + if m != nil { + return m.Cpu + } + return nil +} + +func (m *TaskResourceUsage) GetMemory() *MemoryUsage { + if m != nil { + return m.Memory + } + return nil +} + +type CPUUsage struct { + SystemMode float64 `protobuf:"fixed64,1,opt,name=system_mode,json=systemMode,proto3" json:"system_mode,omitempty"` + UserMode float64 `protobuf:"fixed64,2,opt,name=user_mode,json=userMode,proto3" json:"user_mode,omitempty"` + TotalTicks float64 `protobuf:"fixed64,3,opt,name=total_ticks,json=totalTicks,proto3" json:"total_ticks,omitempty"` + ThrottledPeriods uint64 `protobuf:"varint,4,opt,name=throttled_periods,json=throttledPeriods,proto3" json:"throttled_periods,omitempty"` + ThrottledTime uint64 `protobuf:"varint,5,opt,name=throttled_time,json=throttledTime,proto3" json:"throttled_time,omitempty"` + Percent float64 `protobuf:"fixed64,6,opt,name=percent,proto3" json:"percent,omitempty"` + // MeasuredFields indicates which fields were actually sampled + MeasuredFields []CPUUsage_Fields `protobuf:"varint,7,rep,packed,name=measured_fields,json=measuredFields,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.CPUUsage_Fields" json:"measured_fields,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CPUUsage) Reset() { *m = CPUUsage{} } +func (m *CPUUsage) String() string { return proto.CompactTextString(m) } +func (*CPUUsage) ProtoMessage() {} +func (*CPUUsage) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{27} +} +func (m *CPUUsage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CPUUsage.Unmarshal(m, b) +} +func (m *CPUUsage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CPUUsage.Marshal(b, m, deterministic) +} +func (dst *CPUUsage) XXX_Merge(src proto.Message) { + xxx_messageInfo_CPUUsage.Merge(dst, src) +} +func (m *CPUUsage) XXX_Size() int { + return xxx_messageInfo_CPUUsage.Size(m) +} +func (m *CPUUsage) XXX_DiscardUnknown() { + xxx_messageInfo_CPUUsage.DiscardUnknown(m) +} + +var xxx_messageInfo_CPUUsage proto.InternalMessageInfo + +func (m *CPUUsage) GetSystemMode() float64 { + if m != nil { + return m.SystemMode + } + return 0 +} + +func (m *CPUUsage) GetUserMode() float64 { + if m != nil { + return m.UserMode + } + return 0 +} + +func (m *CPUUsage) GetTotalTicks() float64 { + if m != nil { + return m.TotalTicks + } + return 0 +} + +func (m *CPUUsage) GetThrottledPeriods() uint64 { + if m != nil { + return m.ThrottledPeriods + } + return 0 +} + +func (m *CPUUsage) GetThrottledTime() uint64 { + if m != nil { + return m.ThrottledTime + } + return 0 +} + +func (m *CPUUsage) GetPercent() float64 { + if m != nil { + return m.Percent + } + return 0 +} + +func (m *CPUUsage) GetMeasuredFields() []CPUUsage_Fields { + if m != nil { + return m.MeasuredFields + } + return nil +} + +type MemoryUsage struct { + Rss uint64 `protobuf:"varint,1,opt,name=rss,proto3" json:"rss,omitempty"` + Cache uint64 `protobuf:"varint,2,opt,name=cache,proto3" json:"cache,omitempty"` + MaxUsage uint64 `protobuf:"varint,3,opt,name=max_usage,json=maxUsage,proto3" json:"max_usage,omitempty"` + KernelUsage uint64 `protobuf:"varint,4,opt,name=kernel_usage,json=kernelUsage,proto3" json:"kernel_usage,omitempty"` + KernelMaxUsage uint64 `protobuf:"varint,5,opt,name=kernel_max_usage,json=kernelMaxUsage,proto3" json:"kernel_max_usage,omitempty"` + // MeasuredFields indicates which fields were actually sampled + MeasuredFields []MemoryUsage_Fields `protobuf:"varint,6,rep,packed,name=measured_fields,json=measuredFields,proto3,enum=hashicorp.nomad.plugins.drivers.base.proto.MemoryUsage_Fields" json:"measured_fields,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *MemoryUsage) Reset() { *m = MemoryUsage{} } +func (m *MemoryUsage) String() string { return proto.CompactTextString(m) } +func (*MemoryUsage) ProtoMessage() {} +func (*MemoryUsage) Descriptor() ([]byte, []int) { + return fileDescriptor_driver_b830f3fbdc9ff108, []int{28} +} +func (m *MemoryUsage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_MemoryUsage.Unmarshal(m, b) +} +func (m *MemoryUsage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_MemoryUsage.Marshal(b, m, deterministic) +} +func (dst *MemoryUsage) XXX_Merge(src proto.Message) { + xxx_messageInfo_MemoryUsage.Merge(dst, src) +} +func (m *MemoryUsage) XXX_Size() int { + return xxx_messageInfo_MemoryUsage.Size(m) +} +func (m *MemoryUsage) XXX_DiscardUnknown() { + xxx_messageInfo_MemoryUsage.DiscardUnknown(m) +} + +var xxx_messageInfo_MemoryUsage proto.InternalMessageInfo + +func (m *MemoryUsage) GetRss() uint64 { + if m != nil { + return m.Rss + } + return 0 +} + +func (m *MemoryUsage) GetCache() uint64 { + if m != nil { + return m.Cache + } + return 0 +} + +func (m *MemoryUsage) GetMaxUsage() uint64 { + if m != nil { + return m.MaxUsage + } + return 0 +} + +func (m *MemoryUsage) GetKernelUsage() uint64 { + if m != nil { + return m.KernelUsage + } + return 0 +} + +func (m *MemoryUsage) GetKernelMaxUsage() uint64 { + if m != nil { + return m.KernelMaxUsage + } + return 0 +} + +func (m *MemoryUsage) GetMeasuredFields() []MemoryUsage_Fields { + if m != nil { + return m.MeasuredFields + } + return nil +} + +func init() { + proto.RegisterType((*FingerprintResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.FingerprintResponse") + proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.FingerprintResponse.AttributesEntry") + proto.RegisterType((*RecoverTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.RecoverTaskRequest") + proto.RegisterType((*StartTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.StartTaskRequest") + proto.RegisterType((*StartTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.StartTaskResponse") + proto.RegisterType((*WaitTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.WaitTaskRequest") + proto.RegisterType((*WaitTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.WaitTaskResponse") + proto.RegisterType((*StopTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.StopTaskRequest") + proto.RegisterType((*DestroyTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DestroyTaskRequest") + proto.RegisterType((*ListTasksRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ListTasksRequest") + proto.RegisterType((*ListTasksResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ListTasksResponse") + proto.RegisterType((*InspectTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.InspectTaskRequest") + proto.RegisterType((*InspectTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.InspectTaskResponse") + proto.RegisterType((*TaskStatsRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatsRequest") + proto.RegisterType((*TaskStatsResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatsResponse") + proto.RegisterType((*SignalTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.SignalTaskRequest") + proto.RegisterType((*ExecTaskRequest)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ExecTaskRequest") + proto.RegisterType((*ExecTaskResponse)(nil), "hashicorp.nomad.plugins.drivers.base.proto.ExecTaskResponse") + proto.RegisterType((*DriverCapabilities)(nil), "hashicorp.nomad.plugins.drivers.base.proto.DriverCapabilities") + proto.RegisterType((*TaskConfig)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskConfig") + proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskConfig.EnvEntry") + proto.RegisterType((*Resources)(nil), "hashicorp.nomad.plugins.drivers.base.proto.Resources") + proto.RegisterType((*Mount)(nil), "hashicorp.nomad.plugins.drivers.base.proto.Mount") + proto.RegisterType((*Device)(nil), "hashicorp.nomad.plugins.drivers.base.proto.Device") + proto.RegisterType((*TaskHandle)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskHandle") + proto.RegisterType((*TaskSummary)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskSummary") + proto.RegisterType((*TaskStatus)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatus") + proto.RegisterMapType((map[string]string)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStatus.DriverStatusEntry") + proto.RegisterType((*TaskStats)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStats") + proto.RegisterMapType((map[string]*TaskResourceUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskStats.ResourceUsageByPidEntry") + proto.RegisterType((*TaskResourceUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.TaskResourceUsage") + proto.RegisterType((*CPUUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.CPUUsage") + proto.RegisterType((*MemoryUsage)(nil), "hashicorp.nomad.plugins.drivers.base.proto.MemoryUsage") + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.TaskState", TaskState_name, TaskState_value) + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.CPUUsage_Fields", CPUUsage_Fields_name, CPUUsage_Fields_value) + proto.RegisterEnum("hashicorp.nomad.plugins.drivers.base.proto.MemoryUsage_Fields", MemoryUsage_Fields_name, MemoryUsage_Fields_value) +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// DriverClient is the client API for Driver service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DriverClient interface { + // Fingerprint collects information about the driver including whether the + // driver is able to function in the existing environment. + Fingerprint(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*FingerprintResponse, error) + // RecoverTask is used when a task has been started but the driver may not + // know about it. Such is the case if the driver restarts or is upgraded. + RecoverTask(ctx context.Context, in *RecoverTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // StartTask starts and tracks the task on the implemented runtime + StartTask(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*StartTaskResponse, error) + // WaitTask blocks until the given task exits, returning the result of the + // task. It may be called after the task has exited, but before the task is + // destroyed. + WaitTask(ctx context.Context, in *WaitTaskRequest, opts ...grpc.CallOption) (*WaitTaskResponse, error) + // StopTask stops a given task by sending the desired signal to the process. + // If the task does not exit on its own within the given timeout, it will be + // forcefully killed. + StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // DestroyTask removes the task from the driver's internal state. It cannot + // be called on a running task. + DestroyTask(ctx context.Context, in *DestroyTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // ListTasks returns a list of summary information of all the tasks the + // driver is tracking. + ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) + // InspectTask returns detailed information for the given task + InspectTask(ctx context.Context, in *InspectTaskRequest, opts ...grpc.CallOption) (*InspectTaskResponse, error) + // TaskStats collects and returns runtime metrics for the given task + TaskStats(ctx context.Context, in *TaskStatsRequest, opts ...grpc.CallOption) (*TaskStatsResponse, error) + // SignalTask sends a signal to the task + SignalTask(ctx context.Context, in *SignalTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // ExecTask executes a command inside the tasks execution context + ExecTask(ctx context.Context, in *ExecTaskRequest, opts ...grpc.CallOption) (*ExecTaskResponse, error) +} + +type driverClient struct { + cc *grpc.ClientConn +} + +func NewDriverClient(cc *grpc.ClientConn) DriverClient { + return &driverClient{cc} +} + +func (c *driverClient) Fingerprint(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*FingerprintResponse, error) { + out := new(FingerprintResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Fingerprint", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) RecoverTask(ctx context.Context, in *RecoverTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/RecoverTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) StartTask(ctx context.Context, in *StartTaskRequest, opts ...grpc.CallOption) (*StartTaskResponse, error) { + out := new(StartTaskResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StartTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) WaitTask(ctx context.Context, in *WaitTaskRequest, opts ...grpc.CallOption) (*WaitTaskResponse, error) { + out := new(WaitTaskResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/WaitTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) StopTask(ctx context.Context, in *StopTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StopTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) DestroyTask(ctx context.Context, in *DestroyTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/DestroyTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + out := new(ListTasksResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ListTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) InspectTask(ctx context.Context, in *InspectTaskRequest, opts ...grpc.CallOption) (*InspectTaskResponse, error) { + out := new(InspectTaskResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/InspectTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) TaskStats(ctx context.Context, in *TaskStatsRequest, opts ...grpc.CallOption) (*TaskStatsResponse, error) { + out := new(TaskStatsResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) SignalTask(ctx context.Context, in *SignalTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/SignalTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *driverClient) ExecTask(ctx context.Context, in *ExecTaskRequest, opts ...grpc.CallOption) (*ExecTaskResponse, error) { + out := new(ExecTaskResponse) + err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ExecTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DriverServer is the server API for Driver service. +type DriverServer interface { + // Fingerprint collects information about the driver including whether the + // driver is able to function in the existing environment. + Fingerprint(context.Context, *empty.Empty) (*FingerprintResponse, error) + // RecoverTask is used when a task has been started but the driver may not + // know about it. Such is the case if the driver restarts or is upgraded. + RecoverTask(context.Context, *RecoverTaskRequest) (*empty.Empty, error) + // StartTask starts and tracks the task on the implemented runtime + StartTask(context.Context, *StartTaskRequest) (*StartTaskResponse, error) + // WaitTask blocks until the given task exits, returning the result of the + // task. It may be called after the task has exited, but before the task is + // destroyed. + WaitTask(context.Context, *WaitTaskRequest) (*WaitTaskResponse, error) + // StopTask stops a given task by sending the desired signal to the process. + // If the task does not exit on its own within the given timeout, it will be + // forcefully killed. + StopTask(context.Context, *StopTaskRequest) (*empty.Empty, error) + // DestroyTask removes the task from the driver's internal state. It cannot + // be called on a running task. + DestroyTask(context.Context, *DestroyTaskRequest) (*empty.Empty, error) + // ListTasks returns a list of summary information of all the tasks the + // driver is tracking. + ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) + // InspectTask returns detailed information for the given task + InspectTask(context.Context, *InspectTaskRequest) (*InspectTaskResponse, error) + // TaskStats collects and returns runtime metrics for the given task + TaskStats(context.Context, *TaskStatsRequest) (*TaskStatsResponse, error) + // SignalTask sends a signal to the task + SignalTask(context.Context, *SignalTaskRequest) (*empty.Empty, error) + // ExecTask executes a command inside the tasks execution context + ExecTask(context.Context, *ExecTaskRequest) (*ExecTaskResponse, error) +} + +func RegisterDriverServer(s *grpc.Server, srv DriverServer) { + s.RegisterService(&_Driver_serviceDesc, srv) +} + +func _Driver_Fingerprint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(empty.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).Fingerprint(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/Fingerprint", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).Fingerprint(ctx, req.(*empty.Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_RecoverTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RecoverTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).RecoverTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/RecoverTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).RecoverTask(ctx, req.(*RecoverTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_StartTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).StartTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StartTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).StartTask(ctx, req.(*StartTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_WaitTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WaitTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).WaitTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/WaitTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).WaitTask(ctx, req.(*WaitTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_StopTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StopTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).StopTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/StopTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).StopTask(ctx, req.(*StopTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_DestroyTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DestroyTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).DestroyTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/DestroyTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).DestroyTask(ctx, req.(*DestroyTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).ListTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ListTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).ListTasks(ctx, req.(*ListTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_InspectTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(InspectTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).InspectTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/InspectTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).InspectTask(ctx, req.(*InspectTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_TaskStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TaskStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).TaskStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/TaskStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).TaskStats(ctx, req.(*TaskStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_SignalTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SignalTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).SignalTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/SignalTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).SignalTask(ctx, req.(*SignalTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Driver_ExecTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExecTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DriverServer).ExecTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/hashicorp.nomad.plugins.drivers.base.proto.Driver/ExecTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DriverServer).ExecTask(ctx, req.(*ExecTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Driver_serviceDesc = grpc.ServiceDesc{ + ServiceName: "hashicorp.nomad.plugins.drivers.base.proto.Driver", + HandlerType: (*DriverServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Fingerprint", + Handler: _Driver_Fingerprint_Handler, + }, + { + MethodName: "RecoverTask", + Handler: _Driver_RecoverTask_Handler, + }, + { + MethodName: "StartTask", + Handler: _Driver_StartTask_Handler, + }, + { + MethodName: "WaitTask", + Handler: _Driver_WaitTask_Handler, + }, + { + MethodName: "StopTask", + Handler: _Driver_StopTask_Handler, + }, + { + MethodName: "DestroyTask", + Handler: _Driver_DestroyTask_Handler, + }, + { + MethodName: "ListTasks", + Handler: _Driver_ListTasks_Handler, + }, + { + MethodName: "InspectTask", + Handler: _Driver_InspectTask_Handler, + }, + { + MethodName: "TaskStats", + Handler: _Driver_TaskStats_Handler, + }, + { + MethodName: "SignalTask", + Handler: _Driver_SignalTask_Handler, + }, + { + MethodName: "ExecTask", + Handler: _Driver_ExecTask_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "driver.proto", +} + +func init() { proto.RegisterFile("driver.proto", fileDescriptor_driver_b830f3fbdc9ff108) } + +var fileDescriptor_driver_b830f3fbdc9ff108 = []byte{ + // 1941 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x73, 0x23, 0x49, + 0xf1, 0xb7, 0x9e, 0x96, 0xb2, 0xfd, 0x68, 0xd7, 0xec, 0xec, 0xea, 0xaf, 0x89, 0x3f, 0x33, 0xdb, + 0x11, 0x44, 0x4c, 0xcc, 0x06, 0xda, 0x58, 0x2f, 0x2c, 0x0b, 0xcc, 0x03, 0x8d, 0xad, 0x99, 0x31, + 0xb6, 0x6c, 0x6f, 0xb5, 0x1c, 0xbb, 0x4b, 0x04, 0x34, 0xe5, 0xee, 0x1a, 0xa9, 0xd7, 0xea, 0xc7, + 0x74, 0x55, 0x1b, 0xeb, 0x40, 0x04, 0x07, 0x22, 0x88, 0xe0, 0x40, 0xf0, 0x41, 0x38, 0x70, 0xe5, + 0x0e, 0x37, 0x3e, 0x02, 0xdc, 0xf8, 0x1e, 0x10, 0xf5, 0x68, 0xa9, 0x2d, 0xcd, 0x43, 0x2d, 0xef, + 0x85, 0x93, 0xba, 0x32, 0xb3, 0xb2, 0xb2, 0xf2, 0x97, 0x99, 0x95, 0x4a, 0xd8, 0xf0, 0x12, 0xff, + 0x92, 0x26, 0x9d, 0x38, 0x89, 0x78, 0x84, 0x1e, 0x8c,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0xf1, 0x23, 0x15, 0x17, 0x15, 0xdc, 0x74, 0xe3, 0xf4, 0x54, 0x12, 0x84, + 0x05, 0x82, 0xfd, 0x2a, 0x8d, 0x38, 0x91, 0xaa, 0x2a, 0xb8, 0xe1, 0xc6, 0xe9, 0x17, 0x62, 0x9d, + 0xed, 0x65, 0x23, 0x92, 0x50, 0x26, 0x83, 0x43, 0xed, 0xb5, 0x25, 0x01, 0x7d, 0x02, 0xb7, 0x03, + 0x1a, 0x44, 0xc9, 0xc4, 0x19, 0xfb, 0x81, 0xcf, 0x1d, 0x3f, 0x74, 0xce, 0x27, 0xa2, 0xfd, 0xa8, + 0x4a, 0x49, 0xa4, 0x98, 0x47, 0x82, 0x77, 0x10, 0x3e, 0x15, 0x1c, 0x64, 0xc1, 0x66, 0x14, 0x05, + 0x0e, 0x73, 0xa3, 0x84, 0x3a, 0xc4, 0xfb, 0x46, 0xc2, 0x5e, 0xc1, 0x46, 0x14, 0x05, 0xb6, 0xa0, + 0x75, 0xbd, 0x6f, 0xd0, 0x5d, 0x30, 0xdc, 0x38, 0x65, 0x94, 0x3b, 0xe2, 0xa7, 0x55, 0x97, 0xf7, + 0x03, 0x45, 0xda, 0x8b, 0x53, 0x96, 0x13, 0x08, 0x68, 0x20, 0xb0, 0xc9, 0x09, 0xf4, 0x69, 0xc0, + 0xac, 0x5f, 0x40, 0x4d, 0x22, 0x29, 0x6e, 0x27, 0x93, 0x3c, 0x26, 0x7c, 0xa4, 0x9d, 0xd7, 0x10, + 0x84, 0x53, 0xc2, 0x47, 0x82, 0x39, 0x8a, 0x18, 0x57, 0x4c, 0xe5, 0xc5, 0x86, 0x20, 0x48, 0x66, + 0x1b, 0x1a, 0x09, 0x25, 0x5e, 0x14, 0x8e, 0x27, 0x59, 0x7b, 0x93, 0xad, 0x2d, 0x0f, 0xea, 0x0a, + 0xdc, 0x1b, 0xe8, 0xbf, 0x07, 0x46, 0x4c, 0x93, 0xc0, 0x67, 0xcc, 0x8f, 0x42, 0xa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 0xa8, 0xd7, 0xba, 0x8a, 0xcd, 0x29, 0x43, + 0x75, 0x06, 0x0c, 0x7d, 0x17, 0xb6, 0x66, 0xc2, 0x22, 0xaa, 0x65, 0x91, 0xa8, 0xe2, 0xcd, 0x29, + 0x55, 0x44, 0xbd, 0xe8, 0x97, 0x63, 0x9a, 0xb8, 0x34, 0xe4, 0xb2, 0x10, 0x94, 0x70, 0xb6, 0x44, + 0x1e, 0x6c, 0x07, 0x94, 0xb0, 0x34, 0xa1, 0x9e, 0xf3, 0xd2, 0xa7, 0x63, 0x4f, 0x55, 0x82, 0xad, + 0xdd, 0x9f, 0xac, 0xe2, 0xfe, 0xce, 0x33, 0xa9, 0x02, 0x6f, 0x65, 0x3a, 0xd5, 0xda, 0x7a, 0x05, + 0x75, 0xf5, 0x85, 0xb6, 0xc1, 0xb0, 0xbf, 0xb6, 0x07, 0xbd, 0xbe, 0xd3, 0x3f, 0xd9, 0xef, 0x99, + 0x6b, 0x68, 0x13, 0x9a, 0x67, 0x76, 0x0f, 0xab, 0x65, 0x49, 0xf0, 0x07, 0x27, 0x83, 0xee, 0x91, + 0x33, 0x38, 0xd8, 0x3b, 0xb4, 0xcd, 0x32, 0xba, 0x0d, 0x3b, 0x83, 0x17, 0xf8, 0x64, 0x30, 0x38, + 0xea, 0xed, 0x3b, 0xa7, 0x3d, 0x7c, 0x70, 0xb2, 0x6f, 0x9b, 0x15, 0x84, 0x60, 0x6b, 0x46, 0x1e, + 0x1c, 0xf4, 0x7b, 0x66, 0x15, 0x19, 0xb0, 0x7e, 0xda, 0xc3, 0x7b, 0xbd, 0xe3, 0x81, 0x59, 0xb3, + 0xfe, 0x55, 0x06, 0x23, 0x07, 0xa5, 0x08, 0xee, 0x84, 0xa9, 0x86, 0xbd, 0x8a, 0xc5, 0xa7, 0x28, + 0x36, 0x2e, 0x71, 0x47, 0x0a, 0xa2, 0x2a, 0x56, 0x0b, 0x01, 0x5e, 0x40, 0xae, 0x72, 0x75, 0xa0, + 0x8a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e, 0xe0, 0xd5, 0x7e, 0x83, 0xa5, 0xd6, 0x1a, 0xfa, 0x43, 0x09, 0x9a, + 0xd3, 0x11, 0x12, 0x7a, 0x58, 0xe4, 0x9c, 0xf9, 0xc9, 0x56, 0xfb, 0xd1, 0x8a, 0xbb, 0xa7, 0xb7, + 0xfe, 0x7d, 0x09, 0x1a, 0xd9, 0xf8, 0x08, 0x15, 0xca, 0xec, 0xb9, 0x01, 0x55, 0xfb, 0xe1, 0x6a, + 0x9b, 0xa7, 0x96, 0x10, 0x68, 0x64, 0xc3, 0xa6, 0x62, 0x86, 0xcc, 0x8d, 0xa8, 0xde, 0xe2, 0xf9, + 0x21, 0x18, 0xb9, 0xb1, 0x52, 0x31, 0x88, 0x17, 0xe7, 0x51, 0xef, 0x80, 0x78, 0x3a, 0x7d, 0x2a, + 0x06, 0xf1, 0xfc, 0x20, 0xab, 0x18, 0xc4, 0x0b, 0x23, 0x2f, 0x6b, 0x0d, 0xfd, 0xa9, 0x04, 0x46, + 0x6e, 0xee, 0x54, 0xec, 0xda, 0x8b, 0xf3, 0xad, 0x62, 0xb9, 0xf6, 0x9a, 0x81, 0x97, 0xf6, 0xcf, + 0xac, 0x67, 0x7b, 0xb8, 0xda, 0x8c, 0x69, 0x15, 0xff, 0x2c, 0xcc, 0xbb, 0xac, 0x35, 0x44, 0x01, + 0x66, 0x43, 0x2a, 0x54, 0x2c, 0xa3, 0xe6, 0x87, 0x5b, 0x6f, 0x89, 0x09, 0x91, 0x69, 0xd9, 0x2c, + 0xa9, 0x58, 0x80, 0xcf, 0x0d, 0xbf, 0x8a, 0x65, 0xda, 0xc2, 0xf8, 0x6a, 0xed, 0xe9, 0xfa, 0xcf, + 0x6b, 0xca, 0xba, 0xba, 0xfc, 0xf9, 0xf4, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xa5, 0xc9, + 0x69, 0x93, 0x19, 0x00, 0x00, +} diff --git a/plugins/drivers/base/proto/driver.proto b/plugins/drivers/base/proto/driver.proto new file mode 100644 index 000000000..de60275c4 --- /dev/null +++ b/plugins/drivers/base/proto/driver.proto @@ -0,0 +1,403 @@ +syntax = "proto3"; +package hashicorp.nomad.plugins.drivers.base.proto; +option go_package = "proto"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +// Driver service defines RPCs used to communicate with a nomad runtime driver. +// Some rpcs may not be implemented by the driver based on it's capabilities. +service Driver { + + // Fingerprint collects information about the driver including whether the + // driver is able to function in the existing environment. + rpc Fingerprint(google.protobuf.Empty) returns (FingerprintResponse) {} + + // RecoverTask is used when a task has been started but the driver may not + // know about it. Such is the case if the driver restarts or is upgraded. + rpc RecoverTask(RecoverTaskRequest) returns (google.protobuf.Empty) {} + + // StartTask starts and tracks the task on the implemented runtime + rpc StartTask(StartTaskRequest) returns (StartTaskResponse) {} + + // WaitTask blocks until the given task exits, returning the result of the + // task. It may be called after the task has exited, but before the task is + // destroyed. + rpc WaitTask(WaitTaskRequest) returns (WaitTaskResponse) {} + + // StopTask stops a given task by sending the desired signal to the process. + // If the task does not exit on its own within the given timeout, it will be + // forcefully killed. + rpc StopTask(StopTaskRequest) returns (google.protobuf.Empty) {} + + // DestroyTask removes the task from the driver's internal state. It cannot + // be called on a running task. + rpc DestroyTask(DestroyTaskRequest) returns (google.protobuf.Empty) {} + + // ListTasks returns a list of summary information of all the tasks the + // driver is tracking. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {} + + // InspectTask returns detailed information for the given task + rpc InspectTask(InspectTaskRequest) returns (InspectTaskResponse) {} + + // TaskStats collects and returns runtime metrics for the given task + rpc TaskStats(TaskStatsRequest) returns (TaskStatsResponse) {} + + // The following RPCs are only implemented if the driver sets the + // corresponding capability. + + // SignalTask sends a signal to the task + rpc SignalTask(SignalTaskRequest) returns (google.protobuf.Empty) {} + + // ExecTask executes a command inside the tasks execution context + rpc ExecTask(ExecTaskRequest) returns (ExecTaskResponse) {} +} + + +message FingerprintResponse { + + // Capabilities provides a way for the driver to denote if it implements + // non-core RPCs. Some Driver service RPCs expose additional information + // or functionality outside of the core task management functions. These + // RPCs are only implemented if the driver sets the corresponding capability. + DriverCapabilities capabilities = 1; + + // Attributes are key/value pairs that annotate the nomad client and can be + // used in scheduling contraints and affinities. + map attributes = 2; + + // Detected signifies if the necessary dependancies of the drive are met for + // nominal operation. + bool detected = 3; +} + +message RecoverTaskRequest { + + // TaskId is the ID of the target task + string task_id = 1; + + // Handle is the TaskHandle returned from StartTask + TaskHandle handle = 2; +} + +message StartTaskRequest { + + // Task configuration to launch + TaskConfig task = 1; +} + +message StartTaskResponse { + + // Handle is opague to the client, but must be stored in order to potentially + // recover the task. + TaskHandle handle = 1; +} + +message WaitTaskRequest { + + // TaskId is the ID of the target task + string task_id = 1; +} + +message WaitTaskResponse { + + // ExitCode returned from the task on exit + int32 exit_code = 1; + + // Signal is set if a signal was sent to the task + int32 signal = 2; + + // Err is set if any driver error occured while waiting for the task + string err = 3; +} + +message StopTaskRequest { + + // TaskId is the ID of the target task + string task_id = 1; + + // Timeout defines the amount of time to wait before forcefully killing + // the task. For example, on Unix clients, this means sending a SIGKILL to + // the process. + google.protobuf.Duration timeout = 2; + + // Signal can be set to override the Task's configured shutdown signal + string signal = 3; +} + +message DestroyTaskRequest { + + // TaskId is the ID of the target task + string task_id = 1; +} + +message ListTasksRequest {} + +message ListTasksResponse { + + // Tasks includes a list of summary information for each task + repeated TaskSummary tasks = 1; +} + +message InspectTaskRequest { + + // TaskId is the ID of the target task + string task_id = 1; +} + +message InspectTaskResponse { + + // Task details + TaskStatus task = 1; +} + +message TaskStatsRequest { + + // TaskId is the ID of the target task + string task_id = 1; +} + +message TaskStatsResponse { + + // Stats for the task + TaskStats stats = 1; +} + +message SignalTaskRequest { + + // TaskId is the ID of the target task + string task_id = 1; + + // Signal is the operating system signal to send to the task. Ex: SIGHUP + string signal = 2; +} + +message ExecTaskRequest { + + // TaskId is the ID of the target task + string task_id = 1; + + // Command is the command to execute in the task environment + repeated string command = 2; + + // Timeout is the amount of time to wait for the command to stop. + // Defaults to 0 (run forever) + google.protobuf.Duration timeout = 3; +} + +message ExecTaskResponse {} + +message DriverCapabilities { + + // SendSignals indicates that the driver can send process signals (ex. SIGUSR1) + // to the task. + bool send_signals = 1; + + // Exec indicates that the driver supports executing arbitrary commands + // in the task's execution environment. + bool exec = 2; +} + +message TaskConfig { + + // Id of the task, recommended to the globally unique, must be unique to the driver. + // If not set, a UUID is to be generated. + string id = 1; + + // Name of the task + string name = 2; + + // MsgpackDriverConfig is the encoded driver configuation of the task + bytes msgpack_driver_config = 3; + + // Env is the a set of key/value pairs to be set as environment variables + map env = 4; + + // Resources defines the resources to isolate + Resources resources = 5; + + // Mounts is a list of targets to bind mount into the task directory + repeated Mount mounts = 6; + + // Devices is a list of system devices to mount into the task's execution + // environment. + repeated Device devices = 7; + + // User defines the operating system user the tasks should run as + string user = 8; + + // AllocDir is the directory on the host where the allocation directory + // exists. + string alloc_dir = 9; +} + +message Resources { + // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified) + int64 cpu_period = 1; + // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified) + int64 cpu_quota = 2; + // CPU shares (relative weight vs. other containers). Default: 0 (not specified) + int64 cpu_shares = 3; + // Memory limit in bytes. Default: 0 (not specified) + int64 memory_limit_in_bytes = 4; + // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified) + int64 oom_score_adj = 5; + // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified) + string cpuset_cpus = 6; + // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified) + string cpuset_mems = 7; +} + +message Mount { + + // TaskPath is the file path within the task directory to mount to + string task_path = 1; + + // HostPath is the file path on the host to mount from + string host_path = 2; + + // Readonly if set true, mounts the path in readonly mode + bool readonly = 3; +} + +message Device { + + // TaskPath is the file path within the task to mount the device to + string task_path = 1; + + // HostPath is the path on the host to the source device + string host_path = 2; + + // Permissions defines the Cgroup permissions of the device. + // One or more of the following options can be set: + // * r - allows the task to read from the specified device. + // * w - allows the task to write to the specified device. + // * m - allows the task to create device files that do not yet exist. + // + // Example: "rw" + string permissions = 3; +} + +enum TaskState { + TASK_UNKNOWN = 0; + TASK_RUNNING = 1; + TASK_EXITED = 2; +} + +// TaskHandle is created when starting a task and is used to recover task +message TaskHandle { + + // Driver is the driver which initially created the handle + string driver = 1; + + // Config is the TaskConfig for the task + TaskConfig config = 2; + + // State is the state of the task's execution + TaskState state = 3; + + // DriverState is the encoded state for the specific driver + bytes driver_state = 4; +} + + +// TaskSummary defines summary information of a task, typically used when listing +// many tasks at once. +message TaskSummary { + string id = 1; + string name = 2; + + // State is the state of the task's execution + TaskState state = 3; + + // StartedAt is the timestamp when the task was started + google.protobuf.Timestamp started_at = 4; +} + +// TaskStatus includes detailed information of a specific task +message TaskStatus { + string id = 1; + string name = 2; + + // State is the state of the task's execution + TaskState state = 3; + + // StartedAt is the timestamp when the task was started + google.protobuf.Timestamp started_at = 4; + + // CompletedAt is the timestamp when the task exited. + // If the task is still running, CompletedAt will not be set + google.protobuf.Timestamp completed_at = 5; + + // ExitCode should only be used when CompletedAt is set. + int32 exit_code = 6; + + // DriverStatus is a set of string/string key value pairs specific to the + // implementing driver. + map driver_status = 7; +} + +message TaskStats { + + // Id of the task + string id = 1; + + // Timestamp for which the stats were collected + google.protobuf.Timestamp timestamp = 2; + + // AggResourceUsage is the aggreate usage of all processes + TaskResourceUsage agg_resource_usage = 3; + + // ResourceUsageByPid breaks the usage stats by process + map resource_usage_by_pid = 4; +} + +message TaskResourceUsage { + + // CPU usage stats + CPUUsage cpu = 1; + + // Memory usage stats + MemoryUsage memory = 2; +} + +message CPUUsage { + + double system_mode = 1; + double user_mode = 2; + double total_ticks = 3; + uint64 throttled_periods = 4; + uint64 throttled_time = 5; + double percent = 6; + + enum Fields { + SYSTEM_MODE = 0; + USER_MODE = 1; + TOTAL_TICKS = 2; + THROTTLED_PERIODS = 3; + THROTTLED_TIME = 4; + PERCENT = 5; + } + // MeasuredFields indicates which fields were actually sampled + repeated Fields measured_fields = 7; +} + +message MemoryUsage { + uint64 rss = 1; + uint64 cache = 2; + uint64 max_usage = 3; + uint64 kernel_usage = 4; + uint64 kernel_max_usage = 5; + + enum Fields { + RSS = 0; + CACHE = 1; + MAX_UASGE = 2; + KERNEL_USAGE = 3; + KERNEL_MAX_USAGE = 4; + } + // MeasuredFields indicates which fields were actually sampled + repeated Fields measured_fields = 6; +}