open-nomad/plugins/base/base.proto
2018-08-07 13:03:21 -07:00

47 lines
1.4 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package hashicorp.nomad.plugins.base;
import "google/protobuf/empty.proto";
import "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(google.protobuf.Empty) returns (PluginInfoResponse) {}
// ConfigSchema returns the schema for parsing the plugins configuration.
rpc ConfigSchema(google.protobuf.Empty) returns (ConfigSchemaResponse) {}
}
// PluginType enumerates the type of plugins Nomad supports
enum PluginType {
UNKNOWN = 0;
DRIVER = 1;
DEVICE = 2;
}
// 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 Nomads development and versioning.
string plugin_version = 3;
// name is the name of the plugin
string name = 4;
}
// ConfigSchemaResponse returns the plugins configuration schema.
message ConfigSchemaResponse {
// spec is the plugins configuration schema
hashicorp.nomad.plugins.shared.hclspec.Spec spec = 1;
}