proto

package
v0.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PluginType_name = map[int32]string{
	0: "UNKNOWN",
	2: "DRIVER",
	3: "DEVICE",
}
View Source
var PluginType_value = map[string]int32{
	"UNKNOWN": 0,
	"DRIVER":  2,
	"DEVICE":  3,
}

Functions

func RegisterBasePluginServer

func RegisterBasePluginServer(s *grpc.Server, srv BasePluginServer)

Types

type BasePluginClient

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)
}

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.

func NewBasePluginClient

func NewBasePluginClient(cc grpc.ClientConnInterface) BasePluginClient

type BasePluginServer

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)
}

BasePluginServer is the server API for BasePlugin service.

type ConfigSchemaRequest

type ConfigSchemaRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ConfigSchemaRequest is used to request the configurations schema.

func (*ConfigSchemaRequest) Descriptor

func (*ConfigSchemaRequest) Descriptor() ([]byte, []int)

func (*ConfigSchemaRequest) ProtoMessage

func (*ConfigSchemaRequest) ProtoMessage()

func (*ConfigSchemaRequest) Reset

func (m *ConfigSchemaRequest) Reset()

func (*ConfigSchemaRequest) String

func (m *ConfigSchemaRequest) String() string

func (*ConfigSchemaRequest) XXX_DiscardUnknown

func (m *ConfigSchemaRequest) XXX_DiscardUnknown()

func (*ConfigSchemaRequest) XXX_Marshal

func (m *ConfigSchemaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfigSchemaRequest) XXX_Merge

func (m *ConfigSchemaRequest) XXX_Merge(src proto.Message)

func (*ConfigSchemaRequest) XXX_Size

func (m *ConfigSchemaRequest) XXX_Size() int

func (*ConfigSchemaRequest) XXX_Unmarshal

func (m *ConfigSchemaRequest) XXX_Unmarshal(b []byte) error

type ConfigSchemaResponse

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:"-"`
}

ConfigSchemaResponse returns the plugins configuration schema.

func (*ConfigSchemaResponse) Descriptor

func (*ConfigSchemaResponse) Descriptor() ([]byte, []int)

func (*ConfigSchemaResponse) GetSpec

func (m *ConfigSchemaResponse) GetSpec() *hclspec.Spec

func (*ConfigSchemaResponse) ProtoMessage

func (*ConfigSchemaResponse) ProtoMessage()

func (*ConfigSchemaResponse) Reset

func (m *ConfigSchemaResponse) Reset()

func (*ConfigSchemaResponse) String

func (m *ConfigSchemaResponse) String() string

func (*ConfigSchemaResponse) XXX_DiscardUnknown

func (m *ConfigSchemaResponse) XXX_DiscardUnknown()

func (*ConfigSchemaResponse) XXX_Marshal

func (m *ConfigSchemaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfigSchemaResponse) XXX_Merge

func (m *ConfigSchemaResponse) XXX_Merge(src proto.Message)

func (*ConfigSchemaResponse) XXX_Size

func (m *ConfigSchemaResponse) XXX_Size() int

func (*ConfigSchemaResponse) XXX_Unmarshal

func (m *ConfigSchemaResponse) XXX_Unmarshal(b []byte) error

type NomadConfig

type NomadConfig struct {
	// 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:"-"`
}

NomadConfig is the client configuration sent to all plugins

func (*NomadConfig) Descriptor

func (*NomadConfig) Descriptor() ([]byte, []int)

func (*NomadConfig) GetDriver

func (m *NomadConfig) GetDriver() *NomadDriverConfig

func (*NomadConfig) ProtoMessage

func (*NomadConfig) ProtoMessage()

func (*NomadConfig) Reset

func (m *NomadConfig) Reset()

func (*NomadConfig) String

func (m *NomadConfig) String() string

func (*NomadConfig) XXX_DiscardUnknown

func (m *NomadConfig) XXX_DiscardUnknown()

func (*NomadConfig) XXX_Marshal

func (m *NomadConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NomadConfig) XXX_Merge

func (m *NomadConfig) XXX_Merge(src proto.Message)

func (*NomadConfig) XXX_Size

func (m *NomadConfig) XXX_Size() int

func (*NomadConfig) XXX_Unmarshal

func (m *NomadConfig) XXX_Unmarshal(b []byte) error

type NomadDriverConfig

type NomadDriverConfig struct {
	// ClientMaxPort is the upper range of the ports that the client uses for
	// communicating with plugin subsystems over loopback
	ClientMaxPort uint32 `protobuf:"varint,1,opt,name=ClientMaxPort,proto3" json:"ClientMaxPort,omitempty"`
	// ClientMinPort is the lower range of the ports that the client uses for
	// communicating with plugin subsystems over loopback
	ClientMinPort        uint32   `protobuf:"varint,2,opt,name=ClientMinPort,proto3" json:"ClientMinPort,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

NomadDriverConfig is the driver specific client configuration sent to all driver plugins

func (*NomadDriverConfig) Descriptor

func (*NomadDriverConfig) Descriptor() ([]byte, []int)

func (*NomadDriverConfig) GetClientMaxPort

func (m *NomadDriverConfig) GetClientMaxPort() uint32

func (*NomadDriverConfig) GetClientMinPort

func (m *NomadDriverConfig) GetClientMinPort() uint32

func (*NomadDriverConfig) ProtoMessage

func (*NomadDriverConfig) ProtoMessage()

func (*NomadDriverConfig) Reset

func (m *NomadDriverConfig) Reset()

func (*NomadDriverConfig) String

func (m *NomadDriverConfig) String() string

func (*NomadDriverConfig) XXX_DiscardUnknown

func (m *NomadDriverConfig) XXX_DiscardUnknown()

func (*NomadDriverConfig) XXX_Marshal

func (m *NomadDriverConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NomadDriverConfig) XXX_Merge

func (m *NomadDriverConfig) XXX_Merge(src proto.Message)

func (*NomadDriverConfig) XXX_Size

func (m *NomadDriverConfig) XXX_Size() int

func (*NomadDriverConfig) XXX_Unmarshal

func (m *NomadDriverConfig) XXX_Unmarshal(b []byte) error

type PluginInfoRequest

type PluginInfoRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PluginInfoRequest is used to request the plugins basic information.

func (*PluginInfoRequest) Descriptor

func (*PluginInfoRequest) Descriptor() ([]byte, []int)

func (*PluginInfoRequest) ProtoMessage

func (*PluginInfoRequest) ProtoMessage()

func (*PluginInfoRequest) Reset

func (m *PluginInfoRequest) Reset()

func (*PluginInfoRequest) String

func (m *PluginInfoRequest) String() string

func (*PluginInfoRequest) XXX_DiscardUnknown

func (m *PluginInfoRequest) XXX_DiscardUnknown()

func (*PluginInfoRequest) XXX_Marshal

func (m *PluginInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PluginInfoRequest) XXX_Merge

func (m *PluginInfoRequest) XXX_Merge(src proto.Message)

func (*PluginInfoRequest) XXX_Size

func (m *PluginInfoRequest) XXX_Size() int

func (*PluginInfoRequest) XXX_Unmarshal

func (m *PluginInfoRequest) XXX_Unmarshal(b []byte) error

type PluginInfoResponse

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_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 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:"-"`
}

PluginInfoResponse returns basic information about the plugin such that Nomad can decide whether to load the plugin or not.

func (*PluginInfoResponse) Descriptor

func (*PluginInfoResponse) Descriptor() ([]byte, []int)

func (*PluginInfoResponse) GetName

func (m *PluginInfoResponse) GetName() string

func (*PluginInfoResponse) GetPluginApiVersions

func (m *PluginInfoResponse) GetPluginApiVersions() []string

func (*PluginInfoResponse) GetPluginVersion

func (m *PluginInfoResponse) GetPluginVersion() string

func (*PluginInfoResponse) GetType

func (m *PluginInfoResponse) GetType() PluginType

func (*PluginInfoResponse) ProtoMessage

func (*PluginInfoResponse) ProtoMessage()

func (*PluginInfoResponse) Reset

func (m *PluginInfoResponse) Reset()

func (*PluginInfoResponse) String

func (m *PluginInfoResponse) String() string

func (*PluginInfoResponse) XXX_DiscardUnknown

func (m *PluginInfoResponse) XXX_DiscardUnknown()

func (*PluginInfoResponse) XXX_Marshal

func (m *PluginInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PluginInfoResponse) XXX_Merge

func (m *PluginInfoResponse) XXX_Merge(src proto.Message)

func (*PluginInfoResponse) XXX_Size

func (m *PluginInfoResponse) XXX_Size() int

func (*PluginInfoResponse) XXX_Unmarshal

func (m *PluginInfoResponse) XXX_Unmarshal(b []byte) error

type PluginType

type PluginType int32

PluginType enumerates the type of plugins Nomad supports

const (
	PluginType_UNKNOWN PluginType = 0
	PluginType_DRIVER  PluginType = 2
	PluginType_DEVICE  PluginType = 3
)

func (PluginType) EnumDescriptor

func (PluginType) EnumDescriptor() ([]byte, []int)

func (PluginType) String

func (x PluginType) String() string

type SetConfigRequest

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"`
	// 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:"-"`
}

SetConfigRequest is used to set the configuration

func (*SetConfigRequest) Descriptor

func (*SetConfigRequest) Descriptor() ([]byte, []int)

func (*SetConfigRequest) GetMsgpackConfig

func (m *SetConfigRequest) GetMsgpackConfig() []byte

func (*SetConfigRequest) GetNomadConfig

func (m *SetConfigRequest) GetNomadConfig() *NomadConfig

func (*SetConfigRequest) GetPluginApiVersion

func (m *SetConfigRequest) GetPluginApiVersion() string

func (*SetConfigRequest) ProtoMessage

func (*SetConfigRequest) ProtoMessage()

func (*SetConfigRequest) Reset

func (m *SetConfigRequest) Reset()

func (*SetConfigRequest) String

func (m *SetConfigRequest) String() string

func (*SetConfigRequest) XXX_DiscardUnknown

func (m *SetConfigRequest) XXX_DiscardUnknown()

func (*SetConfigRequest) XXX_Marshal

func (m *SetConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetConfigRequest) XXX_Merge

func (m *SetConfigRequest) XXX_Merge(src proto.Message)

func (*SetConfigRequest) XXX_Size

func (m *SetConfigRequest) XXX_Size() int

func (*SetConfigRequest) XXX_Unmarshal

func (m *SetConfigRequest) XXX_Unmarshal(b []byte) error

type SetConfigResponse

type SetConfigResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

SetConfigResponse is used to respond to setting the configuration

func (*SetConfigResponse) Descriptor

func (*SetConfigResponse) Descriptor() ([]byte, []int)

func (*SetConfigResponse) ProtoMessage

func (*SetConfigResponse) ProtoMessage()

func (*SetConfigResponse) Reset

func (m *SetConfigResponse) Reset()

func (*SetConfigResponse) String

func (m *SetConfigResponse) String() string

func (*SetConfigResponse) XXX_DiscardUnknown

func (m *SetConfigResponse) XXX_DiscardUnknown()

func (*SetConfigResponse) XXX_Marshal

func (m *SetConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetConfigResponse) XXX_Merge

func (m *SetConfigResponse) XXX_Merge(src proto.Message)

func (*SetConfigResponse) XXX_Size

func (m *SetConfigResponse) XXX_Size() int

func (*SetConfigResponse) XXX_Unmarshal

func (m *SetConfigResponse) XXX_Unmarshal(b []byte) error

type UnimplementedBasePluginServer added in v0.11.0

type UnimplementedBasePluginServer struct {
}

UnimplementedBasePluginServer can be embedded to have forward compatible implementations.

func (*UnimplementedBasePluginServer) ConfigSchema added in v0.11.0

func (*UnimplementedBasePluginServer) PluginInfo added in v0.11.0

func (*UnimplementedBasePluginServer) SetConfig added in v0.11.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL