2018-08-07 05:27:47 +00:00
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2018-09-28 17:09:01 +00:00
|
|
|
|
// source: plugins/base/proto/base.proto
|
2018-08-07 05:27:47 +00:00
|
|
|
|
|
2018-08-10 17:50:09 +00:00
|
|
|
|
package proto
|
2018-08-07 05:27:47 +00:00
|
|
|
|
|
|
|
|
|
import (
|
2020-03-02 20:39:25 +00:00
|
|
|
|
context "context"
|
|
|
|
|
fmt "fmt"
|
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
|
hclspec "github.com/hashicorp/nomad/plugins/shared/hclspec"
|
2018-08-07 05:27:47 +00:00
|
|
|
|
grpc "google.golang.org/grpc"
|
2020-03-02 20:39:25 +00:00
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
|
math "math"
|
2018-08-07 05:27:47 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 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.
|
2020-03-02 20:39:25 +00:00
|
|
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
2018-08-07 05:27:47 +00:00
|
|
|
|
|
|
|
|
|
// PluginType enumerates the type of plugins Nomad supports
|
|
|
|
|
type PluginType int32
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
|
PluginType_UNKNOWN PluginType = 0
|
2018-08-10 17:50:09 +00:00
|
|
|
|
PluginType_DRIVER PluginType = 2
|
|
|
|
|
PluginType_DEVICE PluginType = 3
|
2018-08-07 05:27:47 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
var PluginType_name = map[int32]string{
|
|
|
|
|
0: "UNKNOWN",
|
2018-08-10 17:50:09 +00:00
|
|
|
|
2: "DRIVER",
|
|
|
|
|
3: "DEVICE",
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
var PluginType_value = map[string]int32{
|
|
|
|
|
"UNKNOWN": 0,
|
2018-08-10 17:50:09 +00:00
|
|
|
|
"DRIVER": 2,
|
|
|
|
|
"DEVICE": 3,
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x PluginType) String() string {
|
|
|
|
|
return proto.EnumName(PluginType_name, int32(x))
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
func (PluginType) EnumDescriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{0}
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
// PluginInfoRequest is used to request the plugins basic information.
|
|
|
|
|
type PluginInfoRequest struct {
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *PluginInfoRequest) Reset() { *m = PluginInfoRequest{} }
|
|
|
|
|
func (m *PluginInfoRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*PluginInfoRequest) ProtoMessage() {}
|
|
|
|
|
func (*PluginInfoRequest) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{0}
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
func (m *PluginInfoRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_PluginInfoRequest.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *PluginInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_PluginInfoRequest.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *PluginInfoRequest) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_PluginInfoRequest.Merge(m, src)
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *PluginInfoRequest) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_PluginInfoRequest.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *PluginInfoRequest) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_PluginInfoRequest.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_PluginInfoRequest proto.InternalMessageInfo
|
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
// PluginInfoResponse returns basic information about the plugin such
|
|
|
|
|
// that Nomad can decide whether to load the plugin or not.
|
|
|
|
|
type PluginInfoResponse struct {
|
|
|
|
|
// type indicates what type of plugin this is.
|
2018-08-09 22:29:00 +00:00
|
|
|
|
Type PluginType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.nomad.plugins.base.proto.PluginType" json:"type,omitempty"`
|
2018-12-14 22:46:32 +00:00
|
|
|
|
// plugin_api_versions indicates the versions of the Nomad Plugin API
|
|
|
|
|
// this plugin supports.
|
|
|
|
|
PluginApiVersions []string `protobuf:"bytes,2,rep,name=plugin_api_versions,json=pluginApiVersions,proto3" json:"plugin_api_versions,omitempty"`
|
2018-08-07 05:27:47 +00:00
|
|
|
|
// plugin_version is the semver version of this individual plugin.
|
|
|
|
|
// This is divorce from Nomad’s development and versioning.
|
|
|
|
|
PluginVersion string `protobuf:"bytes,3,opt,name=plugin_version,json=pluginVersion,proto3" json:"plugin_version,omitempty"`
|
|
|
|
|
// name is the name of the plugin
|
|
|
|
|
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *PluginInfoResponse) Reset() { *m = PluginInfoResponse{} }
|
|
|
|
|
func (m *PluginInfoResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*PluginInfoResponse) ProtoMessage() {}
|
|
|
|
|
func (*PluginInfoResponse) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{1}
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
func (m *PluginInfoResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_PluginInfoResponse.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *PluginInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_PluginInfoResponse.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *PluginInfoResponse) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_PluginInfoResponse.Merge(m, src)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *PluginInfoResponse) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_PluginInfoResponse.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *PluginInfoResponse) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_PluginInfoResponse.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_PluginInfoResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *PluginInfoResponse) GetType() PluginType {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.Type
|
|
|
|
|
}
|
|
|
|
|
return PluginType_UNKNOWN
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-14 22:46:32 +00:00
|
|
|
|
func (m *PluginInfoResponse) GetPluginApiVersions() []string {
|
2018-08-07 05:27:47 +00:00
|
|
|
|
if m != nil {
|
2018-12-14 22:46:32 +00:00
|
|
|
|
return m.PluginApiVersions
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
2018-12-14 22:46:32 +00:00
|
|
|
|
return nil
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *PluginInfoResponse) GetPluginVersion() string {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.PluginVersion
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *PluginInfoResponse) GetName() string {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.Name
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
// ConfigSchemaRequest is used to request the configurations schema.
|
|
|
|
|
type ConfigSchemaRequest struct {
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *ConfigSchemaRequest) Reset() { *m = ConfigSchemaRequest{} }
|
|
|
|
|
func (m *ConfigSchemaRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*ConfigSchemaRequest) ProtoMessage() {}
|
|
|
|
|
func (*ConfigSchemaRequest) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{2}
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
func (m *ConfigSchemaRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_ConfigSchemaRequest.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *ConfigSchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_ConfigSchemaRequest.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *ConfigSchemaRequest) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_ConfigSchemaRequest.Merge(m, src)
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *ConfigSchemaRequest) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_ConfigSchemaRequest.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *ConfigSchemaRequest) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_ConfigSchemaRequest.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_ConfigSchemaRequest proto.InternalMessageInfo
|
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
// ConfigSchemaResponse returns the plugins configuration schema.
|
|
|
|
|
type ConfigSchemaResponse struct {
|
|
|
|
|
// spec is the plugins configuration schema
|
|
|
|
|
Spec *hclspec.Spec `protobuf:"bytes,1,opt,name=spec,proto3" json:"spec,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *ConfigSchemaResponse) Reset() { *m = ConfigSchemaResponse{} }
|
|
|
|
|
func (m *ConfigSchemaResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*ConfigSchemaResponse) ProtoMessage() {}
|
|
|
|
|
func (*ConfigSchemaResponse) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{3}
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
func (m *ConfigSchemaResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_ConfigSchemaResponse.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *ConfigSchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_ConfigSchemaResponse.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *ConfigSchemaResponse) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_ConfigSchemaResponse.Merge(m, src)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *ConfigSchemaResponse) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_ConfigSchemaResponse.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *ConfigSchemaResponse) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_ConfigSchemaResponse.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_ConfigSchemaResponse proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *ConfigSchemaResponse) GetSpec() *hclspec.Spec {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.Spec
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
// SetConfigRequest is used to set the configuration
|
|
|
|
|
type SetConfigRequest struct {
|
|
|
|
|
// msgpack_config is the configuration encoded as MessagePack.
|
2018-10-17 02:21:15 +00:00
|
|
|
|
MsgpackConfig []byte `protobuf:"bytes,1,opt,name=msgpack_config,json=msgpackConfig,proto3" json:"msgpack_config,omitempty"`
|
|
|
|
|
// nomad_config is the nomad client configuration sent to all plugins.
|
2018-12-14 22:46:32 +00:00
|
|
|
|
NomadConfig *NomadConfig `protobuf:"bytes,2,opt,name=nomad_config,json=nomadConfig,proto3" json:"nomad_config,omitempty"`
|
|
|
|
|
// plugin_api_version is the api version to use.
|
|
|
|
|
PluginApiVersion string `protobuf:"bytes,3,opt,name=plugin_api_version,json=pluginApiVersion,proto3" json:"plugin_api_version,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *SetConfigRequest) Reset() { *m = SetConfigRequest{} }
|
|
|
|
|
func (m *SetConfigRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*SetConfigRequest) ProtoMessage() {}
|
|
|
|
|
func (*SetConfigRequest) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{4}
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
func (m *SetConfigRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_SetConfigRequest.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *SetConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_SetConfigRequest.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *SetConfigRequest) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_SetConfigRequest.Merge(m, src)
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *SetConfigRequest) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_SetConfigRequest.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *SetConfigRequest) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_SetConfigRequest.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_SetConfigRequest proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *SetConfigRequest) GetMsgpackConfig() []byte {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.MsgpackConfig
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-17 02:21:15 +00:00
|
|
|
|
func (m *SetConfigRequest) GetNomadConfig() *NomadConfig {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.NomadConfig
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-14 22:46:32 +00:00
|
|
|
|
func (m *SetConfigRequest) GetPluginApiVersion() string {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.PluginApiVersion
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-17 02:21:15 +00:00
|
|
|
|
// NomadConfig is the client configuration sent to all plugins
|
|
|
|
|
type NomadConfig struct {
|
2018-10-19 03:31:01 +00:00
|
|
|
|
// driver specific configuration sent to all plugins
|
|
|
|
|
Driver *NomadDriverConfig `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
2018-10-17 02:21:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *NomadConfig) Reset() { *m = NomadConfig{} }
|
|
|
|
|
func (m *NomadConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*NomadConfig) ProtoMessage() {}
|
|
|
|
|
func (*NomadConfig) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{5}
|
2018-10-17 02:21:15 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-10-17 02:21:15 +00:00
|
|
|
|
func (m *NomadConfig) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_NomadConfig.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *NomadConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_NomadConfig.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *NomadConfig) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_NomadConfig.Merge(m, src)
|
2018-10-17 02:21:15 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *NomadConfig) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_NomadConfig.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *NomadConfig) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_NomadConfig.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_NomadConfig proto.InternalMessageInfo
|
|
|
|
|
|
2018-10-19 03:31:01 +00:00
|
|
|
|
func (m *NomadConfig) GetDriver() *NomadDriverConfig {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.Driver
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// NomadDriverConfig is the driver specific client configuration sent to all
|
|
|
|
|
// driver plugins
|
|
|
|
|
type NomadDriverConfig struct {
|
|
|
|
|
// ClientMaxPort is the upper range of the ports that the client uses for
|
|
|
|
|
// communicating with plugin subsystems over loopback
|
2019-03-14 14:56:27 +00:00
|
|
|
|
ClientMaxPort uint32 `protobuf:"varint,1,opt,name=ClientMaxPort,proto3" json:"ClientMaxPort,omitempty"`
|
2018-10-19 03:31:01 +00:00
|
|
|
|
// ClientMinPort is the lower range of the ports that the client uses for
|
|
|
|
|
// communicating with plugin subsystems over loopback
|
2019-03-14 14:56:27 +00:00
|
|
|
|
ClientMinPort uint32 `protobuf:"varint,2,opt,name=ClientMinPort,proto3" json:"ClientMinPort,omitempty"`
|
2018-10-19 03:31:01 +00:00
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *NomadDriverConfig) Reset() { *m = NomadDriverConfig{} }
|
|
|
|
|
func (m *NomadDriverConfig) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*NomadDriverConfig) ProtoMessage() {}
|
|
|
|
|
func (*NomadDriverConfig) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{6}
|
2018-10-19 03:31:01 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-10-19 03:31:01 +00:00
|
|
|
|
func (m *NomadDriverConfig) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_NomadDriverConfig.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *NomadDriverConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_NomadDriverConfig.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *NomadDriverConfig) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_NomadDriverConfig.Merge(m, src)
|
2018-10-19 03:31:01 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *NomadDriverConfig) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_NomadDriverConfig.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *NomadDriverConfig) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_NomadDriverConfig.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_NomadDriverConfig proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *NomadDriverConfig) GetClientMaxPort() uint32 {
|
2018-10-17 02:21:15 +00:00
|
|
|
|
if m != nil {
|
|
|
|
|
return m.ClientMaxPort
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2018-10-19 03:31:01 +00:00
|
|
|
|
func (m *NomadDriverConfig) GetClientMinPort() uint32 {
|
2018-10-17 02:21:15 +00:00
|
|
|
|
if m != nil {
|
|
|
|
|
return m.ClientMinPort
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
// SetConfigResponse is used to respond to setting the configuration
|
|
|
|
|
type SetConfigResponse struct {
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *SetConfigResponse) Reset() { *m = SetConfigResponse{} }
|
|
|
|
|
func (m *SetConfigResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*SetConfigResponse) ProtoMessage() {}
|
|
|
|
|
func (*SetConfigResponse) Descriptor() ([]byte, []int) {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
return fileDescriptor_19edef855873449e, []int{7}
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
func (m *SetConfigResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_SetConfigResponse.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *SetConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_SetConfigResponse.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func (m *SetConfigResponse) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_SetConfigResponse.Merge(m, src)
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
|
|
|
|
func (m *SetConfigResponse) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_SetConfigResponse.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *SetConfigResponse) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_SetConfigResponse.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_SetConfigResponse proto.InternalMessageInfo
|
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
func init() {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
proto.RegisterEnum("hashicorp.nomad.plugins.base.proto.PluginType", PluginType_name, PluginType_value)
|
2018-08-09 22:29:00 +00:00
|
|
|
|
proto.RegisterType((*PluginInfoRequest)(nil), "hashicorp.nomad.plugins.base.proto.PluginInfoRequest")
|
|
|
|
|
proto.RegisterType((*PluginInfoResponse)(nil), "hashicorp.nomad.plugins.base.proto.PluginInfoResponse")
|
|
|
|
|
proto.RegisterType((*ConfigSchemaRequest)(nil), "hashicorp.nomad.plugins.base.proto.ConfigSchemaRequest")
|
|
|
|
|
proto.RegisterType((*ConfigSchemaResponse)(nil), "hashicorp.nomad.plugins.base.proto.ConfigSchemaResponse")
|
|
|
|
|
proto.RegisterType((*SetConfigRequest)(nil), "hashicorp.nomad.plugins.base.proto.SetConfigRequest")
|
2018-10-17 02:21:15 +00:00
|
|
|
|
proto.RegisterType((*NomadConfig)(nil), "hashicorp.nomad.plugins.base.proto.NomadConfig")
|
2018-10-19 03:31:01 +00:00
|
|
|
|
proto.RegisterType((*NomadDriverConfig)(nil), "hashicorp.nomad.plugins.base.proto.NomadDriverConfig")
|
2018-08-09 22:29:00 +00:00
|
|
|
|
proto.RegisterType((*SetConfigResponse)(nil), "hashicorp.nomad.plugins.base.proto.SetConfigResponse")
|
2020-03-02 20:39:25 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
proto.RegisterFile("plugins/base/proto/base.proto", fileDescriptor_19edef855873449e)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var fileDescriptor_19edef855873449e = []byte{
|
2020-11-10 16:42:35 +00:00
|
|
|
|
// 521 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x51, 0x6f, 0x12, 0x41,
|
|
|
|
|
0x10, 0xee, 0x01, 0xd2, 0x30, 0x40, 0x73, 0x2c, 0x9a, 0x10, 0x12, 0x13, 0x72, 0xb1, 0x09, 0x31,
|
|
|
|
|
0xcd, 0x12, 0x51, 0xd4, 0x47, 0x85, 0xf2, 0x40, 0x4c, 0xb1, 0x59, 0x14, 0x8d, 0x31, 0xb9, 0x6c,
|
|
|
|
|
0x8f, 0x2d, 0x77, 0x11, 0xf6, 0xd6, 0xdb, 0x6b, 0x63, 0x4d, 0x7c, 0xf2, 0xd9, 0x5f, 0xe4, 0xa3,
|
|
|
|
|
0x7f, 0xcc, 0xdc, 0xee, 0x5e, 0x39, 0x5a, 0x4d, 0x8f, 0xa7, 0x1b, 0x66, 0xbe, 0xef, 0x9b, 0x99,
|
|
|
|
|
0x8f, 0x59, 0x78, 0x28, 0x56, 0x17, 0xcb, 0x80, 0xcb, 0xde, 0x19, 0x95, 0xac, 0x27, 0xa2, 0x30,
|
|
|
|
|
0x0e, 0x55, 0x88, 0x55, 0x88, 0x1c, 0x9f, 0x4a, 0x3f, 0xf0, 0xc2, 0x48, 0x60, 0x1e, 0xae, 0xe9,
|
|
|
|
|
0x02, 0x1b, 0x38, 0xde, 0x60, 0xda, 0x87, 0xa9, 0x84, 0xf4, 0x69, 0xc4, 0x16, 0x3d, 0xdf, 0x5b,
|
|
|
|
|
0x49, 0xc1, 0xbc, 0xe4, 0xeb, 0x26, 0x81, 0x86, 0x39, 0x4d, 0x68, 0x9c, 0x2a, 0xe0, 0x84, 0x9f,
|
|
|
|
|
0x87, 0x84, 0x7d, 0xbd, 0x60, 0x32, 0x76, 0xfe, 0x58, 0x80, 0xb2, 0x59, 0x29, 0x42, 0x2e, 0x19,
|
|
|
|
|
0x1a, 0x42, 0x29, 0xbe, 0x12, 0xac, 0x65, 0x75, 0xac, 0xee, 0x41, 0x1f, 0xe3, 0xbb, 0xa7, 0xc0,
|
|
|
|
|
0x5a, 0xe5, 0xdd, 0x95, 0x60, 0x44, 0x71, 0x11, 0x86, 0xa6, 0x86, 0xb9, 0x54, 0x04, 0xee, 0x25,
|
|
|
|
|
0x8b, 0x64, 0x10, 0x72, 0xd9, 0x2a, 0x74, 0x8a, 0xdd, 0x0a, 0x69, 0xe8, 0xd2, 0x6b, 0x11, 0xcc,
|
|
|
|
|
0x4d, 0x01, 0x1d, 0xc2, 0x81, 0xc1, 0x1b, 0x6c, 0xab, 0xd8, 0xb1, 0xba, 0x15, 0x52, 0xd7, 0x59,
|
|
|
|
|
0x83, 0x43, 0x08, 0x4a, 0x9c, 0xae, 0x59, 0xab, 0xa4, 0x8a, 0x2a, 0x76, 0x1e, 0x40, 0x73, 0x14,
|
|
|
|
|
0xf2, 0xf3, 0x60, 0x39, 0xf3, 0x7c, 0xb6, 0xa6, 0xe9, 0x72, 0x1f, 0xe1, 0xfe, 0x76, 0xda, 0x6c,
|
|
|
|
|
0xf7, 0x0a, 0x4a, 0x89, 0x2f, 0x6a, 0xbb, 0x6a, 0xff, 0xe8, 0xbf, 0xdb, 0x69, 0x3f, 0xb1, 0xf1,
|
|
|
|
|
0x13, 0xcf, 0x04, 0xf3, 0x88, 0x62, 0x3a, 0xbf, 0x2d, 0xb0, 0x67, 0x2c, 0xd6, 0xea, 0xa6, 0x5d,
|
|
|
|
|
0xb2, 0xc0, 0x5a, 0x2e, 0x05, 0xf5, 0xbe, 0xb8, 0x9e, 0x2a, 0xa8, 0x06, 0x35, 0x52, 0x37, 0x59,
|
|
|
|
|
0x8d, 0x46, 0x04, 0x6a, 0xaa, 0x4d, 0x0a, 0x2a, 0xa8, 0x29, 0x7a, 0x79, 0x3c, 0x9e, 0x26, 0x05,
|
|
|
|
|
0xd3, 0xb4, 0xca, 0x37, 0x3f, 0xd0, 0x11, 0xa0, 0xdb, 0x5e, 0x1b, 0xff, 0xec, 0x9b, 0x56, 0x3b,
|
|
|
|
|
0x9f, 0xa1, 0x9a, 0x51, 0x42, 0x27, 0x50, 0x5e, 0x44, 0xc1, 0x25, 0x8b, 0x8c, 0x21, 0x83, 0xdc,
|
|
|
|
|
0xa3, 0x1c, 0x2b, 0x9a, 0x19, 0xc8, 0x88, 0x38, 0x2e, 0x34, 0x6e, 0x15, 0xd1, 0x23, 0xa8, 0x8f,
|
|
|
|
|
0x56, 0x01, 0xe3, 0xf1, 0x09, 0xfd, 0x76, 0x1a, 0x46, 0xb1, 0x6a, 0x55, 0x27, 0xdb, 0xc9, 0x0c,
|
|
|
|
|
0x2a, 0xe0, 0x0a, 0x55, 0xd8, 0x42, 0xe9, 0x64, 0x72, 0xc8, 0x19, 0xef, 0xf5, 0x7f, 0xfa, 0xf8,
|
|
|
|
|
0x09, 0xc0, 0xe6, 0x02, 0x51, 0x15, 0xf6, 0xdf, 0x4f, 0xdf, 0x4c, 0xdf, 0x7e, 0x98, 0xda, 0x7b,
|
|
|
|
|
0x08, 0xa0, 0x7c, 0x4c, 0x26, 0xf3, 0x31, 0xb1, 0x0b, 0x2a, 0x1e, 0xcf, 0x27, 0xa3, 0xb1, 0x5d,
|
|
|
|
|
0xec, 0xff, 0x2a, 0x02, 0x0c, 0xa9, 0x64, 0x9a, 0x87, 0x7e, 0xa4, 0x0a, 0xc9, 0x4b, 0x40, 0x83,
|
|
|
|
|
0xfc, 0x37, 0x9f, 0x79, 0x4f, 0xed, 0xe7, 0xbb, 0xd2, 0xf4, 0xf8, 0xce, 0x1e, 0xfa, 0x69, 0x41,
|
|
|
|
|
0x2d, 0x7b, 0xad, 0xe8, 0x45, 0x1e, 0xa9, 0x7f, 0x9c, 0x7d, 0xfb, 0xe5, 0xee, 0xc4, 0xeb, 0x29,
|
|
|
|
|
0xbe, 0x43, 0xe5, 0xda, 0x5b, 0xf4, 0x2c, 0x8f, 0xd0, 0xcd, 0x67, 0xd0, 0x1e, 0xec, 0xc8, 0x4a,
|
|
|
|
|
0x7b, 0x0f, 0xf7, 0x3f, 0xdd, 0x53, 0xc5, 0xb3, 0xb2, 0xfa, 0x3c, 0xfd, 0x1b, 0x00, 0x00, 0xff,
|
|
|
|
|
0xff, 0xdc, 0x0f, 0xf5, 0x51, 0x1c, 0x05, 0x00, 0x00,
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
|
var _ context.Context
|
2020-03-02 20:39:25 +00:00
|
|
|
|
var _ grpc.ClientConnInterface
|
2018-08-07 05:27:47 +00:00
|
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
|
// is compatible with the grpc package it is being compiled against.
|
2020-03-02 20:39:25 +00:00
|
|
|
|
const _ = grpc.SupportPackageIsVersion6
|
2018-08-07 05:27:47 +00:00
|
|
|
|
|
|
|
|
|
// BasePluginClient is the client API for BasePlugin service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type BasePluginClient interface {
|
|
|
|
|
// PluginInfo describes the type and version of a plugin.
|
2018-08-07 23:16:23 +00:00
|
|
|
|
PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
// ConfigSchema returns the schema for parsing the plugins configuration.
|
2018-08-07 23:16:23 +00:00
|
|
|
|
ConfigSchema(ctx context.Context, in *ConfigSchemaRequest, opts ...grpc.CallOption) (*ConfigSchemaResponse, error)
|
|
|
|
|
// SetConfig is used to set the configuration.
|
|
|
|
|
SetConfig(ctx context.Context, in *SetConfigRequest, opts ...grpc.CallOption) (*SetConfigResponse, error)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type basePluginClient struct {
|
2020-03-02 20:39:25 +00:00
|
|
|
|
cc grpc.ClientConnInterface
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-02 20:39:25 +00:00
|
|
|
|
func NewBasePluginClient(cc grpc.ClientConnInterface) BasePluginClient {
|
2018-08-07 05:27:47 +00:00
|
|
|
|
return &basePluginClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
func (c *basePluginClient) PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error) {
|
2018-08-07 05:27:47 +00:00
|
|
|
|
out := new(PluginInfoResponse)
|
2018-08-09 22:29:00 +00:00
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.proto.BasePlugin/PluginInfo", in, out, opts...)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
func (c *basePluginClient) ConfigSchema(ctx context.Context, in *ConfigSchemaRequest, opts ...grpc.CallOption) (*ConfigSchemaResponse, error) {
|
2018-08-07 05:27:47 +00:00
|
|
|
|
out := new(ConfigSchemaResponse)
|
2018-08-09 22:29:00 +00:00
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.proto.BasePlugin/ConfigSchema", in, out, opts...)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 23:16:23 +00:00
|
|
|
|
func (c *basePluginClient) SetConfig(ctx context.Context, in *SetConfigRequest, opts ...grpc.CallOption) (*SetConfigResponse, error) {
|
|
|
|
|
out := new(SetConfigResponse)
|
2018-08-09 22:29:00 +00:00
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.proto.BasePlugin/SetConfig", in, out, opts...)
|
2018-08-07 23:16:23 +00:00
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
// BasePluginServer is the server API for BasePlugin service.
|
|
|
|
|
type BasePluginServer interface {
|
|
|
|
|
// PluginInfo describes the type and version of a plugin.
|
2018-08-07 23:16:23 +00:00
|
|
|
|
PluginInfo(context.Context, *PluginInfoRequest) (*PluginInfoResponse, error)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
// ConfigSchema returns the schema for parsing the plugins configuration.
|
2018-08-07 23:16:23 +00:00
|
|
|
|
ConfigSchema(context.Context, *ConfigSchemaRequest) (*ConfigSchemaResponse, error)
|
|
|
|
|
// SetConfig is used to set the configuration.
|
|
|
|
|
SetConfig(context.Context, *SetConfigRequest) (*SetConfigResponse, error)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
2020-03-02 20:39:25 +00:00
|
|
|
|
// UnimplementedBasePluginServer can be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedBasePluginServer struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (*UnimplementedBasePluginServer) PluginInfo(ctx context.Context, req *PluginInfoRequest) (*PluginInfoResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method PluginInfo not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (*UnimplementedBasePluginServer) ConfigSchema(ctx context.Context, req *ConfigSchemaRequest) (*ConfigSchemaResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ConfigSchema not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (*UnimplementedBasePluginServer) SetConfig(ctx context.Context, req *SetConfigRequest) (*SetConfigResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetConfig not implemented")
|
|
|
|
|
}
|
|
|
|
|
|
2018-08-07 05:27:47 +00:00
|
|
|
|
func RegisterBasePluginServer(s *grpc.Server, srv BasePluginServer) {
|
|
|
|
|
s.RegisterService(&_BasePlugin_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _BasePlugin_PluginInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
2018-08-07 23:16:23 +00:00
|
|
|
|
in := new(PluginInfoRequest)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(BasePluginServer).PluginInfo(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
2018-08-09 22:29:00 +00:00
|
|
|
|
FullMethod: "/hashicorp.nomad.plugins.base.proto.BasePlugin/PluginInfo",
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2018-08-07 23:16:23 +00:00
|
|
|
|
return srv.(BasePluginServer).PluginInfo(ctx, req.(*PluginInfoRequest))
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _BasePlugin_ConfigSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
2018-08-07 23:16:23 +00:00
|
|
|
|
in := new(ConfigSchemaRequest)
|
2018-08-07 05:27:47 +00:00
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(BasePluginServer).ConfigSchema(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
2018-08-09 22:29:00 +00:00
|
|
|
|
FullMethod: "/hashicorp.nomad.plugins.base.proto.BasePlugin/ConfigSchema",
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
2018-08-07 23:16:23 +00:00
|
|
|
|
return srv.(BasePluginServer).ConfigSchema(ctx, req.(*ConfigSchemaRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _BasePlugin_SetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(SetConfigRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(BasePluginServer).SetConfig(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
2018-08-09 22:29:00 +00:00
|
|
|
|
FullMethod: "/hashicorp.nomad.plugins.base.proto.BasePlugin/SetConfig",
|
2018-08-07 23:16:23 +00:00
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(BasePluginServer).SetConfig(ctx, req.(*SetConfigRequest))
|
2018-08-07 05:27:47 +00:00
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _BasePlugin_serviceDesc = grpc.ServiceDesc{
|
2018-08-09 22:29:00 +00:00
|
|
|
|
ServiceName: "hashicorp.nomad.plugins.base.proto.BasePlugin",
|
2018-08-07 05:27:47 +00:00
|
|
|
|
HandlerType: (*BasePluginServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "PluginInfo",
|
|
|
|
|
Handler: _BasePlugin_PluginInfo_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "ConfigSchema",
|
|
|
|
|
Handler: _BasePlugin_ConfigSchema_Handler,
|
|
|
|
|
},
|
2018-08-07 23:16:23 +00:00
|
|
|
|
{
|
|
|
|
|
MethodName: "SetConfig",
|
|
|
|
|
Handler: _BasePlugin_SetConfig_Handler,
|
|
|
|
|
},
|
2018-08-07 05:27:47 +00:00
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
2018-09-28 17:09:01 +00:00
|
|
|
|
Metadata: "plugins/base/proto/base.proto",
|
|
|
|
|
}
|