binary

package
v0.0.0-...-99a0925 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0, BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package binary implements a ControllerPlugin that forks an external binary once per operation.

Calling convention

<binary_path> --op <op> [--<key> <value> ...]

The binary writes a single JSON object to stdout and exits. Exit code 0 + empty "error" field = success. Exit code != 0 or non-empty "error" field = failure.

Operations and flags

create
  --volume-id  <volumeID>   pre-generated UUIDv4
  --name       <name>       human-readable label
  stdout JSON: {"token":"...","private_data":"...","error":""}

destroy
  --volume-id  <volumeID>
  stdout JSON: {"error":""}

Configuration

The binary reads its own credentials / config from wherever it likes (file, env vars, etc.). CubeMaster only passes the operation-specific fields above.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin is a ControllerPlugin that forks a subprocess for each operation.

func New

func New(name, binaryPath string) *Plugin

New creates a Plugin.

func (*Plugin) Create

func (p *Plugin) Create(
	ctx context.Context,
	volumeID, name string,
) (*plugin.VolumeInfo, error)

Create forks the binary with --op create.

func (*Plugin) Destroy

func (p *Plugin) Destroy(ctx context.Context, volumeID string) error

Destroy forks the binary with --op destroy.

func (*Plugin) Name

func (p *Plugin) Name() string

Jump to

Keyboard shortcuts

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