mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
move protos
This commit is contained in:
485
plugins/base/proto/base.pb.go
Normal file
485
plugins/base/proto/base.pb.go
Normal file
@@ -0,0 +1,485 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// source: github.com/hashicorp/nomad/plugins/base/proto/base.proto
|
||||
|
||||
package base
|
||||
|
||||
import proto "github.com/golang/protobuf/proto"
|
||||
import fmt "fmt"
|
||||
import math "math"
|
||||
import hclspec "github.com/hashicorp/nomad/plugins/shared/hclspec"
|
||||
|
||||
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
|
||||
|
||||
// PluginType enumerates the type of plugins Nomad supports
|
||||
type PluginType int32
|
||||
|
||||
const (
|
||||
PluginType_UNKNOWN PluginType = 0
|
||||
PluginType_DRIVER PluginType = 1
|
||||
PluginType_DEVICE PluginType = 2
|
||||
)
|
||||
|
||||
var PluginType_name = map[int32]string{
|
||||
0: "UNKNOWN",
|
||||
1: "DRIVER",
|
||||
2: "DEVICE",
|
||||
}
|
||||
var PluginType_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
"DRIVER": 1,
|
||||
"DEVICE": 2,
|
||||
}
|
||||
|
||||
func (x PluginType) String() string {
|
||||
return proto.EnumName(PluginType_name, int32(x))
|
||||
}
|
||||
func (PluginType) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_base_01259c48147dbaa4, []int{0}
|
||||
}
|
||||
|
||||
// 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) {
|
||||
return fileDescriptor_base_01259c48147dbaa4, []int{0}
|
||||
}
|
||||
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)
|
||||
}
|
||||
func (dst *PluginInfoRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PluginInfoRequest.Merge(dst, src)
|
||||
}
|
||||
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
|
||||
|
||||
// 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.
|
||||
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_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) {
|
||||
return fileDescriptor_base_01259c48147dbaa4, []int{1}
|
||||
}
|
||||
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)
|
||||
}
|
||||
func (dst *PluginInfoResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_PluginInfoResponse.Merge(dst, src)
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
func (m *PluginInfoResponse) GetPluginApiVersion() string {
|
||||
if m != nil {
|
||||
return m.PluginApiVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PluginInfoResponse) GetPluginVersion() string {
|
||||
if m != nil {
|
||||
return m.PluginVersion
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *PluginInfoResponse) GetName() string {
|
||||
if m != nil {
|
||||
return m.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// 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) {
|
||||
return fileDescriptor_base_01259c48147dbaa4, []int{2}
|
||||
}
|
||||
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)
|
||||
}
|
||||
func (dst *ConfigSchemaRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ConfigSchemaRequest.Merge(dst, src)
|
||||
}
|
||||
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
|
||||
|
||||
// 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) {
|
||||
return fileDescriptor_base_01259c48147dbaa4, []int{3}
|
||||
}
|
||||
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)
|
||||
}
|
||||
func (dst *ConfigSchemaResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ConfigSchemaResponse.Merge(dst, src)
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
// SetConfigRequest is used to set the configuration
|
||||
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"`
|
||||
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_01259c48147dbaa4, []int{4}
|
||||
}
|
||||
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)
|
||||
}
|
||||
func (dst *SetConfigRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SetConfigRequest.Merge(dst, src)
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
// 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) {
|
||||
return fileDescriptor_base_01259c48147dbaa4, []int{5}
|
||||
}
|
||||
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)
|
||||
}
|
||||
func (dst *SetConfigResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_SetConfigResponse.Merge(dst, src)
|
||||
}
|
||||
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
|
||||
|
||||
func init() {
|
||||
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")
|
||||
proto.RegisterType((*SetConfigResponse)(nil), "hashicorp.nomad.plugins.base.proto.SetConfigResponse")
|
||||
proto.RegisterEnum("hashicorp.nomad.plugins.base.proto.PluginType", PluginType_name, PluginType_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
|
||||
|
||||
// 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.
|
||||
PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error)
|
||||
// ConfigSchema returns the schema for parsing the plugins configuration.
|
||||
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)
|
||||
}
|
||||
|
||||
type basePluginClient struct {
|
||||
cc *grpc.ClientConn
|
||||
}
|
||||
|
||||
func NewBasePluginClient(cc *grpc.ClientConn) BasePluginClient {
|
||||
return &basePluginClient{cc}
|
||||
}
|
||||
|
||||
func (c *basePluginClient) PluginInfo(ctx context.Context, in *PluginInfoRequest, opts ...grpc.CallOption) (*PluginInfoResponse, error) {
|
||||
out := new(PluginInfoResponse)
|
||||
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.proto.BasePlugin/PluginInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basePluginClient) ConfigSchema(ctx context.Context, in *ConfigSchemaRequest, opts ...grpc.CallOption) (*ConfigSchemaResponse, error) {
|
||||
out := new(ConfigSchemaResponse)
|
||||
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.proto.BasePlugin/ConfigSchema", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *basePluginClient) SetConfig(ctx context.Context, in *SetConfigRequest, opts ...grpc.CallOption) (*SetConfigResponse, error) {
|
||||
out := new(SetConfigResponse)
|
||||
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.proto.BasePlugin/SetConfig", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BasePluginServer is the server API for BasePlugin service.
|
||||
type BasePluginServer interface {
|
||||
// PluginInfo describes the type and version of a plugin.
|
||||
PluginInfo(context.Context, *PluginInfoRequest) (*PluginInfoResponse, error)
|
||||
// ConfigSchema returns the schema for parsing the plugins configuration.
|
||||
ConfigSchema(context.Context, *ConfigSchemaRequest) (*ConfigSchemaResponse, error)
|
||||
// SetConfig is used to set the configuration.
|
||||
SetConfig(context.Context, *SetConfigRequest) (*SetConfigResponse, error)
|
||||
}
|
||||
|
||||
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) {
|
||||
in := new(PluginInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasePluginServer).PluginInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/hashicorp.nomad.plugins.base.proto.BasePlugin/PluginInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasePluginServer).PluginInfo(ctx, req.(*PluginInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BasePlugin_ConfigSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ConfigSchemaRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BasePluginServer).ConfigSchema(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/hashicorp.nomad.plugins.base.proto.BasePlugin/ConfigSchema",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
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,
|
||||
FullMethod: "/hashicorp.nomad.plugins.base.proto.BasePlugin/SetConfig",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BasePluginServer).SetConfig(ctx, req.(*SetConfigRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _BasePlugin_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "hashicorp.nomad.plugins.base.proto.BasePlugin",
|
||||
HandlerType: (*BasePluginServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "PluginInfo",
|
||||
Handler: _BasePlugin_PluginInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ConfigSchema",
|
||||
Handler: _BasePlugin_ConfigSchema_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetConfig",
|
||||
Handler: _BasePlugin_SetConfig_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "github.com/hashicorp/nomad/plugins/base/proto/base.proto",
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterFile("github.com/hashicorp/nomad/plugins/base/proto/base.proto", fileDescriptor_base_01259c48147dbaa4)
|
||||
}
|
||||
|
||||
var fileDescriptor_base_01259c48147dbaa4 = []byte{
|
||||
// 435 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x8b, 0xd3, 0x40,
|
||||
0x14, 0xc7, 0x37, 0xbb, 0xa1, 0xb2, 0x6f, 0xb7, 0x25, 0x4e, 0x15, 0x4a, 0x4e, 0x25, 0x20, 0x14,
|
||||
0x29, 0x13, 0xac, 0x56, 0xeb, 0xad, 0xb6, 0xf6, 0x50, 0x84, 0x2a, 0xa9, 0x56, 0xf1, 0x12, 0xa6,
|
||||
0xd3, 0x69, 0x12, 0x6c, 0x32, 0x63, 0x26, 0x15, 0x2a, 0x78, 0xf2, 0xec, 0x1f, 0xe5, 0x7f, 0x26,
|
||||
0x99, 0x49, 0xda, 0x28, 0x8a, 0xe9, 0x29, 0x8f, 0xf7, 0x3e, 0xdf, 0xef, 0xbc, 0x1f, 0x81, 0x51,
|
||||
0x10, 0x65, 0xe1, 0x7e, 0x8d, 0x29, 0x8f, 0xdd, 0x90, 0xc8, 0x30, 0xa2, 0x3c, 0x15, 0x6e, 0xc2,
|
||||
0x63, 0xb2, 0x71, 0xc5, 0x6e, 0x1f, 0x44, 0x89, 0x74, 0xd7, 0x44, 0x32, 0x57, 0xa4, 0x3c, 0xe3,
|
||||
0x2a, 0xc4, 0x2a, 0x44, 0xce, 0x11, 0xc7, 0x0a, 0xc7, 0x05, 0x8e, 0x4f, 0x8c, 0x3d, 0xae, 0xe1,
|
||||
0x2e, 0x43, 0x92, 0xb2, 0x8d, 0x1b, 0xd2, 0x9d, 0x14, 0x8c, 0xe6, 0x5f, 0x3f, 0x0f, 0xb4, 0x83,
|
||||
0xd3, 0x86, 0xbb, 0x6f, 0x14, 0x38, 0x4f, 0xb6, 0xdc, 0x63, 0x9f, 0xf7, 0x4c, 0x66, 0xce, 0x4f,
|
||||
0x03, 0x50, 0x35, 0x2b, 0x05, 0x4f, 0x24, 0x43, 0x13, 0x30, 0xb3, 0x83, 0x60, 0x1d, 0xa3, 0x6b,
|
||||
0xf4, 0x5a, 0x03, 0x8c, 0xff, 0xdf, 0x20, 0xd6, 0x2e, 0x6f, 0x0f, 0x82, 0x79, 0x4a, 0x8b, 0xfa,
|
||||
0x80, 0x34, 0xe6, 0x13, 0x11, 0xf9, 0x5f, 0x58, 0x2a, 0x23, 0x9e, 0x74, 0x2e, 0xbb, 0x46, 0xef,
|
||||
0xda, 0xb3, 0x74, 0xe5, 0x85, 0x88, 0x56, 0x3a, 0x8f, 0x1e, 0x40, 0xab, 0xa0, 0x4b, 0xf2, 0x4a,
|
||||
0x91, 0x4d, 0x9d, 0x2d, 0x31, 0x04, 0x66, 0x42, 0x62, 0xd6, 0x31, 0x55, 0x51, 0xc5, 0xce, 0x7d,
|
||||
0x68, 0x4f, 0x79, 0xb2, 0x8d, 0x82, 0x25, 0x0d, 0x59, 0x4c, 0xca, 0xd1, 0x3e, 0xc0, 0xbd, 0xdf,
|
||||
0xd3, 0xc5, 0x6c, 0x63, 0x30, 0xf3, 0xad, 0xa8, 0xd9, 0x6e, 0x06, 0xfd, 0x7f, 0xce, 0xa6, 0xb7,
|
||||
0x89, 0x8b, 0x6d, 0xe2, 0xa5, 0x60, 0xd4, 0x53, 0x4a, 0xe7, 0x39, 0x58, 0x4b, 0x96, 0x69, 0xf3,
|
||||
0xe2, 0xb5, 0xbc, 0xff, 0x58, 0x06, 0x82, 0xd0, 0x4f, 0x3e, 0x55, 0x05, 0xe5, 0x7f, 0xeb, 0x35,
|
||||
0x8b, 0xac, 0xa6, 0xf3, 0x23, 0x54, 0xa4, 0xba, 0xa3, 0x87, 0x8f, 0x00, 0x4e, 0xdb, 0x43, 0x37,
|
||||
0x70, 0xe7, 0xdd, 0xe2, 0xd5, 0xe2, 0xf5, 0xfb, 0x85, 0x75, 0x81, 0x00, 0x1a, 0x2f, 0xbd, 0xf9,
|
||||
0x6a, 0xe6, 0x59, 0x86, 0x8a, 0x67, 0xab, 0xf9, 0x74, 0x66, 0x5d, 0x0e, 0x7e, 0x5c, 0x01, 0x4c,
|
||||
0x88, 0x64, 0x5a, 0x87, 0xbe, 0x95, 0x0e, 0xf9, 0x15, 0xd1, 0xb0, 0xfe, 0xbd, 0x2a, 0xff, 0x82,
|
||||
0xfd, 0xf4, 0x5c, 0x99, 0x6e, 0xdf, 0xb9, 0x40, 0xdf, 0x0d, 0xb8, 0xad, 0xee, 0x1a, 0x3d, 0xab,
|
||||
0x63, 0xf5, 0x97, 0xa3, 0xd9, 0xa3, 0xf3, 0x85, 0xc7, 0x2e, 0xbe, 0xc2, 0xf5, 0x71, 0xb7, 0xe8,
|
||||
0x49, 0x1d, 0xa3, 0x3f, 0xaf, 0x68, 0x0f, 0xcf, 0x54, 0x95, 0x6f, 0x4f, 0x1a, 0x1f, 0xcd, 0x9c,
|
||||
0x58, 0x37, 0x14, 0xf2, 0xf8, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x3e, 0xab, 0xdf, 0x0d,
|
||||
0x04, 0x00, 0x00,
|
||||
}
|
||||
64
plugins/base/proto/base.proto
Normal file
64
plugins/base/proto/base.proto
Normal file
@@ -0,0 +1,64 @@
|
||||
syntax = "proto3";
|
||||
package hashicorp.nomad.plugins.base.proto;
|
||||
option go_package = "base";
|
||||
|
||||
import "github.com/hashicorp/nomad/plugins/shared/hclspec/hcl_spec.proto";
|
||||
|
||||
// BasePlugin is the methods that all Nomad plugins must support.
|
||||
service BasePlugin {
|
||||
|
||||
// PluginInfo describes the type and version of a plugin.
|
||||
rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse) {}
|
||||
|
||||
// ConfigSchema returns the schema for parsing the plugins configuration.
|
||||
rpc ConfigSchema(ConfigSchemaRequest) returns (ConfigSchemaResponse) {}
|
||||
|
||||
// SetConfig is used to set the configuration.
|
||||
rpc SetConfig(SetConfigRequest) returns (SetConfigResponse) {}
|
||||
}
|
||||
|
||||
// PluginType enumerates the type of plugins Nomad supports
|
||||
enum PluginType {
|
||||
UNKNOWN = 0;
|
||||
DRIVER = 1;
|
||||
DEVICE = 2;
|
||||
}
|
||||
|
||||
// PluginInfoRequest is used to request the plugins basic information.
|
||||
message PluginInfoRequest {}
|
||||
|
||||
// PluginInfoResponse returns basic information about the plugin such
|
||||
// that Nomad can decide whether to load the plugin or not.
|
||||
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_version is the semver version of this individual plugin.
|
||||
// This is divorce from Nomad’s development and versioning.
|
||||
string plugin_version = 3;
|
||||
|
||||
// name is the name of the plugin
|
||||
string name = 4;
|
||||
}
|
||||
|
||||
// ConfigSchemaRequest is used to request the configurations schema.
|
||||
message ConfigSchemaRequest {}
|
||||
|
||||
// ConfigSchemaResponse returns the plugins configuration schema.
|
||||
message ConfigSchemaResponse {
|
||||
// spec is the plugins configuration schema
|
||||
hashicorp.nomad.plugins.shared.hclspec.Spec spec = 1;
|
||||
}
|
||||
|
||||
// SetConfigRequest is used to set the configuration
|
||||
message SetConfigRequest {
|
||||
// msgpack_config is the configuration encoded as MessagePack.
|
||||
bytes msgpack_config = 1;
|
||||
}
|
||||
|
||||
// SetConfigResponse is used to respond to setting the configuration
|
||||
message SetConfigResponse {}
|
||||
Reference in New Issue
Block a user