Plugin development
Storage and backup integrations are plugins: separate processes that Nexhypro Virtual starts and calls. The SDK is the Go module github.com/nexhypro/nexhypro/packages/plugin-sdk; plugins in other languages implement the same contract.
The contract
The host starts the plugin with NEXHYPRO_PLUGIN_SOCKET and NEXHYPRO_PLUGIN_TOKEN and calls it with JSON over HTTP on that Unix socket:
POST /v1/call/{method} {"config": {...}, "args": {...}}
→ {"result": ...} or {"error": {"code": "plugin.…", "detail": "…"}}Every request carries the token as Authorization: Bearer. The contract version is 1.0.0: the host refuses another major version; minor versions add optional methods that a plugin announces in capabilities.
| Method | Kind | Result |
|---|---|---|
info, schema, health | all | identity, configuration schema, reachability |
storage.systems, .volumes, .hosts, .snapshots, .performance | storage | arrays and their objects |
backup.jobs, .repositories, .protected, .restore_points | backup | jobs and coverage |
Methods not listed in capabilities are never called. Plugins report plugin.not_supported, plugin.auth_failed (the array refused the credentials), plugin.unreachable, plugin.bad_config, plugin.bad_response or plugin.internal; the host adds plugin.unavailable and plugin.timeout.
A Go plugin
package main
import sdk "github.com/nexhypro/nexhypro/packages/plugin-sdk"
type plugin struct{}
func (plugin) Info() sdk.Info {
return sdk.Info{Name: "example-array", Version: "1.0.0", APIVersion: sdk.APIVersion, Kind: sdk.KindStorage,
Vendor: "Example", Product: "Example Array", Locations: []string{sdk.LocationCenter},
Feature: sdk.FeatureStorage, Capabilities: []string{sdk.MethodStorageSystems},
Locales: map[string]map[string]string{"en": {"field.url": "URL"}, "tr": {"field.url": "URL"}}}
}
// ConfigSchema, Health and Systems … (see packages/plugin-sdk/examples/static-storage)
func main() { sdk.Main(plugin{}) }The configuration schema is JSON Schema. Mark passwords and tokens with "x-secret": true: the panel stores them sealed and never shows them again. UI labels come from Locales (field.<name>, field.<name>.help, description) in Turkish and English.
Locations: center plugins run in the panel's worker; connector plugins run next to the cluster, for arrays reachable only from there.
Packaging
go build -trimpath -o example-array .
NEXHYPRO_PLUGIN_SIGNING_KEY=signing.key go run github.com/nexhypro/nexhypro/packages/plugin-sdk/cmd/nexhypro-plugin-pack \
-bin example-array -out dist/example-arrayA package is a directory with plugin.json (the manifest, with the binary's SHA-256), the binary and plugin.sig, an Ed25519 signature over the manifest. The panel loads packages signed by a trusted key: the Nexhypro Virtual release key, or keys listed in NEXHYPRO_PLUGIN_TRUSTED_KEYS. Unsigned packages load only in development builds.
Nexhypro Virtual encrypts plugins it distributes per customer (-seal-key); the panel decrypts them in memory with the key in its licence.
Conformance tests
func TestConformance(t *testing.T) { plugintest.Conformance(t, plugin{}) }plugintest.Conformance checks the manifest, the schema, the error codes and every announced method's payloads. Run it in your CI before publishing a version.