This commit is contained in:
Alex Dadgar
2018-12-14 14:46:32 -08:00
parent 296141bb58
commit d4fd73d536
2 changed files with 71 additions and 58 deletions

View File

@@ -48,7 +48,7 @@ func (x PluginType) String() string {
return proto.EnumName(PluginType_name, int32(x))
}
func (PluginType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{0}
return fileDescriptor_base_f2480776612a8fbd, []int{0}
}
// PluginInfoRequest is used to request the plugins basic information.
@@ -62,7 +62,7 @@ func (m *PluginInfoRequest) Reset() { *m = PluginInfoRequest{} }
func (m *PluginInfoRequest) String() string { return proto.CompactTextString(m) }
func (*PluginInfoRequest) ProtoMessage() {}
func (*PluginInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{0}
return fileDescriptor_base_f2480776612a8fbd, []int{0}
}
func (m *PluginInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PluginInfoRequest.Unmarshal(m, b)
@@ -87,9 +87,9 @@ var xxx_messageInfo_PluginInfoRequest proto.InternalMessageInfo
type PluginInfoResponse struct {
// type indicates what type of plugin this is.
Type PluginType `protobuf:"varint,1,opt,name=type,proto3,enum=hashicorp.nomad.plugins.base.proto.PluginType" json:"type,omitempty"`
// plugin_api_version indicates the version of the Nomad Plugin API
// this plugin is built against.
PluginApiVersion string `protobuf:"bytes,2,opt,name=plugin_api_version,json=pluginApiVersion,proto3" json:"plugin_api_version,omitempty"`
// 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"`
// plugin_version is the semver version of this individual plugin.
// This is divorce from Nomads development and versioning.
PluginVersion string `protobuf:"bytes,3,opt,name=plugin_version,json=pluginVersion,proto3" json:"plugin_version,omitempty"`
@@ -104,7 +104,7 @@ func (m *PluginInfoResponse) Reset() { *m = PluginInfoResponse{} }
func (m *PluginInfoResponse) String() string { return proto.CompactTextString(m) }
func (*PluginInfoResponse) ProtoMessage() {}
func (*PluginInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{1}
return fileDescriptor_base_f2480776612a8fbd, []int{1}
}
func (m *PluginInfoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PluginInfoResponse.Unmarshal(m, b)
@@ -131,11 +131,11 @@ func (m *PluginInfoResponse) GetType() PluginType {
return PluginType_UNKNOWN
}
func (m *PluginInfoResponse) GetPluginApiVersion() string {
func (m *PluginInfoResponse) GetPluginApiVersions() []string {
if m != nil {
return m.PluginApiVersion
return m.PluginApiVersions
}
return ""
return nil
}
func (m *PluginInfoResponse) GetPluginVersion() string {
@@ -163,7 +163,7 @@ func (m *ConfigSchemaRequest) Reset() { *m = ConfigSchemaRequest{} }
func (m *ConfigSchemaRequest) String() string { return proto.CompactTextString(m) }
func (*ConfigSchemaRequest) ProtoMessage() {}
func (*ConfigSchemaRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{2}
return fileDescriptor_base_f2480776612a8fbd, []int{2}
}
func (m *ConfigSchemaRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfigSchemaRequest.Unmarshal(m, b)
@@ -196,7 +196,7 @@ func (m *ConfigSchemaResponse) Reset() { *m = ConfigSchemaResponse{} }
func (m *ConfigSchemaResponse) String() string { return proto.CompactTextString(m) }
func (*ConfigSchemaResponse) ProtoMessage() {}
func (*ConfigSchemaResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{3}
return fileDescriptor_base_f2480776612a8fbd, []int{3}
}
func (m *ConfigSchemaResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ConfigSchemaResponse.Unmarshal(m, b)
@@ -228,17 +228,19 @@ type SetConfigRequest struct {
// msgpack_config is the configuration encoded as MessagePack.
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.
NomadConfig *NomadConfig `protobuf:"bytes,2,opt,name=nomad_config,json=nomadConfig,proto3" json:"nomad_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
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:"-"`
}
func (m *SetConfigRequest) Reset() { *m = SetConfigRequest{} }
func (m *SetConfigRequest) String() string { return proto.CompactTextString(m) }
func (*SetConfigRequest) ProtoMessage() {}
func (*SetConfigRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{4}
return fileDescriptor_base_f2480776612a8fbd, []int{4}
}
func (m *SetConfigRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConfigRequest.Unmarshal(m, b)
@@ -272,6 +274,13 @@ func (m *SetConfigRequest) GetNomadConfig() *NomadConfig {
return nil
}
func (m *SetConfigRequest) GetPluginApiVersion() string {
if m != nil {
return m.PluginApiVersion
}
return ""
}
// NomadConfig is the client configuration sent to all plugins
type NomadConfig struct {
// driver specific configuration sent to all plugins
@@ -285,7 +294,7 @@ func (m *NomadConfig) Reset() { *m = NomadConfig{} }
func (m *NomadConfig) String() string { return proto.CompactTextString(m) }
func (*NomadConfig) ProtoMessage() {}
func (*NomadConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{5}
return fileDescriptor_base_f2480776612a8fbd, []int{5}
}
func (m *NomadConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NomadConfig.Unmarshal(m, b)
@@ -330,7 +339,7 @@ func (m *NomadDriverConfig) Reset() { *m = NomadDriverConfig{} }
func (m *NomadDriverConfig) String() string { return proto.CompactTextString(m) }
func (*NomadDriverConfig) ProtoMessage() {}
func (*NomadDriverConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{6}
return fileDescriptor_base_f2480776612a8fbd, []int{6}
}
func (m *NomadDriverConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NomadDriverConfig.Unmarshal(m, b)
@@ -375,7 +384,7 @@ func (m *SetConfigResponse) Reset() { *m = SetConfigResponse{} }
func (m *SetConfigResponse) String() string { return proto.CompactTextString(m) }
func (*SetConfigResponse) ProtoMessage() {}
func (*SetConfigResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_base_6813a9f13eda45d4, []int{7}
return fileDescriptor_base_f2480776612a8fbd, []int{7}
}
func (m *SetConfigResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetConfigResponse.Unmarshal(m, b)
@@ -551,41 +560,42 @@ var _BasePlugin_serviceDesc = grpc.ServiceDesc{
Metadata: "plugins/base/proto/base.proto",
}
func init() { proto.RegisterFile("plugins/base/proto/base.proto", fileDescriptor_base_6813a9f13eda45d4) }
func init() { proto.RegisterFile("plugins/base/proto/base.proto", fileDescriptor_base_f2480776612a8fbd) }
var fileDescriptor_base_6813a9f13eda45d4 = []byte{
// 519 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x5d, 0x6b, 0x1a, 0x4d,
0x14, 0xc7, 0xb3, 0xea, 0x63, 0xc8, 0x51, 0x83, 0x99, 0x3c, 0x05, 0x11, 0x0a, 0x61, 0x69, 0x21,
0x94, 0xb0, 0x4b, 0x6d, 0x6d, 0x7b, 0x99, 0x6a, 0xbc, 0x90, 0x12, 0x1b, 0xd6, 0xd6, 0x96, 0x52,
0x90, 0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0x47, 0xbd, 0xa0, 0x5e, 0x40, 0xbb, 0x37, 0xea, 0x77, 0x7b, 0xf5, 0x62, 0xeb, 0xae,
0x08, 0xd0, 0xa1, 0x9a, 0x99, 0x3c, 0xf2, 0x2d, 0x53, 0x48, 0x2f, 0x9b, 0xb4, 0xb7, 0xbf, 0xe1,
0xdc, 0xf7, 0xd1, 0x7c, 0xb6, 0x6b, 0x9a, 0x69, 0xdf, 0xdd, 0x23, 0xdf, 0x1d, 0xa8, 0xe6, 0xef,
0x8f, 0x3c, 0xdf, 0x46, 0xea, 0x0f, 0x87, 0xdc, 0x7c, 0xb1, 0x7b, 0xe2, 0xaa, 0x8b, 0xaf, 0x70,
0xb0, 0xda, 0x2d, 0x79, 0xba, 0x8d, 0xd0, 0xaf, 0x87, 0xdd, 0x6c, 0xef, 0x98, 0x95, 0xd5, 0xee,
0xec, 0x7f, 0xf8, 0x0f, 0x83, 0x93, 0x32, 0x3e, 0x4f, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x53,
0xfe, 0xaa, 0x3a, 0x07, 0x05, 0x00, 0x00,
var fileDescriptor_base_f2480776612a8fbd = []byte{
// 535 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x41, 0x8f, 0x12, 0x4d,
0x10, 0xdd, 0x01, 0x3e, 0x36, 0x14, 0xb0, 0x81, 0xe6, 0x33, 0x21, 0x24, 0x26, 0x64, 0xa2, 0x09,
0x31, 0x9b, 0x9e, 0x88, 0xa2, 0x1e, 0x57, 0x58, 0x0e, 0xc4, 0x2c, 0x6e, 0x06, 0x45, 0x63, 0x4c,
0x48, 0x33, 0xf4, 0x32, 0x1d, 0xa1, 0xbb, 0x9d, 0x1e, 0x36, 0xae, 0x89, 0x27, 0xcf, 0xfe, 0x22,
0x8f, 0xfe, 0x31, 0x33, 0xdd, 0x0d, 0x0c, 0xbb, 0x1a, 0xe1, 0x34,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0xeb, 0x57, 0xb2, 0xed, 0x1f,
0x59, 0x80, 0x2e, 0x51, 0xd4, 0xf0, 0xd0, 0xb7, 0xb5, 0x42, 0xf2, 0x12, 0x50, 0x67, 0xff, 0x9b,
0x4f, 0xbd, 0xa7, 0xc6, 0xb3, 0x43, 0x69, 0x66, 0x7c, 0xf7, 0x08, 0x7d, 0x77, 0xa0, 0x94, 0xbe,
0x56, 0xf4, 0x7c, 0x1f, 0xa9, 0x3f, 0x9c, 0x7d, 0xe3, 0xc5, 0xe1, 0xc4, 0xcd, 0x14, 0x5f, 0xa1,
0xb0, 0xf1, 0x16, 0x3d, 0xdd, 0x47, 0xe8, 0xf6, 0x33, 0x68, 0x74, 0x0e, 0x64, 0xad, 0x7b, 0x77,
0x8f, 0x3f, 0xfc, 0xa7, 0x8b, 0xd3, 0xbc, 0xfe, 0x3c, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xcc,
0x26, 0x80, 0xcf, 0x37, 0x05, 0x00, 0x00,
}

View File

@@ -33,9 +33,9 @@ message PluginInfoResponse {
// type indicates what type of plugin this is.
PluginType type = 1;
// plugin_api_version indicates the version of the Nomad Plugin API
// this plugin is built against.
string plugin_api_version = 2;
// plugin_api_versions indicates the versions of the Nomad Plugin API
// this plugin supports.
repeated string plugin_api_versions = 2;
// plugin_version is the semver version of this individual plugin.
// This is divorce from Nomads development and versioning.
@@ -61,6 +61,9 @@ message SetConfigRequest {
// nomad_config is the nomad client configuration sent to all plugins.
NomadConfig nomad_config = 2;
// plugin_api_version is the api version to use.
string plugin_api_version = 3;
}
// NomadConfig is the client configuration sent to all plugins