open-nomad/plugins/base/base.pb.go

310 lines
12 KiB
Go
Raw Normal View History

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: hashicorp/nomad/plugins/base/base.proto
package hashicorp_nomad_plugins_base
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import empty "github.com/golang/protobuf/ptypes/empty"
import hclspec "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_b0ba14970497002b, []int{0}
}
// 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.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 Nomads 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_b0ba14970497002b, []int{0}
}
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 ""
}
// 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_b0ba14970497002b, []int{1}
}
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
}
func init() {
proto.RegisterType((*PluginInfoResponse)(nil), "hashicorp.nomad.plugins.base.PluginInfoResponse")
proto.RegisterType((*ConfigSchemaResponse)(nil), "hashicorp.nomad.plugins.base.ConfigSchemaResponse")
proto.RegisterEnum("hashicorp.nomad.plugins.base.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 *empty.Empty, opts ...grpc.CallOption) (*PluginInfoResponse, error)
// ConfigSchema returns the schema for parsing the plugins configuration.
ConfigSchema(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ConfigSchemaResponse, error)
}
type basePluginClient struct {
cc *grpc.ClientConn
}
func NewBasePluginClient(cc *grpc.ClientConn) BasePluginClient {
return &basePluginClient{cc}
}
func (c *basePluginClient) PluginInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PluginInfoResponse, error) {
out := new(PluginInfoResponse)
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.BasePlugin/PluginInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *basePluginClient) ConfigSchema(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ConfigSchemaResponse, error) {
out := new(ConfigSchemaResponse)
err := c.cc.Invoke(ctx, "/hashicorp.nomad.plugins.base.BasePlugin/ConfigSchema", 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, *empty.Empty) (*PluginInfoResponse, error)
// ConfigSchema returns the schema for parsing the plugins configuration.
ConfigSchema(context.Context, *empty.Empty) (*ConfigSchemaResponse, 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(empty.Empty)
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.BasePlugin/PluginInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasePluginServer).PluginInfo(ctx, req.(*empty.Empty))
}
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(empty.Empty)
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.BasePlugin/ConfigSchema",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BasePluginServer).ConfigSchema(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _BasePlugin_serviceDesc = grpc.ServiceDesc{
ServiceName: "hashicorp.nomad.plugins.base.BasePlugin",
HandlerType: (*BasePluginServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "PluginInfo",
Handler: _BasePlugin_PluginInfo_Handler,
},
{
MethodName: "ConfigSchema",
Handler: _BasePlugin_ConfigSchema_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "hashicorp/nomad/plugins/base/base.proto",
}
func init() {
proto.RegisterFile("hashicorp/nomad/plugins/base/base.proto", fileDescriptor_base_b0ba14970497002b)
}
var fileDescriptor_base_b0ba14970497002b = []byte{
// 366 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0xfb, 0x40,
0x10, 0xc5, 0x9b, 0xfe, 0x43, 0xff, 0x38, 0xd5, 0x12, 0x16, 0x91, 0x52, 0x3d, 0x94, 0x80, 0x58,
0xa4, 0x6c, 0x34, 0xe2, 0xcd, 0x83, 0x5a, 0x73, 0x28, 0x42, 0x95, 0x54, 0x6b, 0x0f, 0x42, 0xd9,
0xa6, 0xd3, 0x24, 0xd0, 0x64, 0x97, 0x6c, 0x2b, 0xf4, 0xb3, 0x79, 0xf5, 0x83, 0x49, 0x76, 0x9b,
0xda, 0x83, 0x2d, 0x5e, 0x92, 0x61, 0xf7, 0xf7, 0x66, 0x67, 0x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