The adapter.EdgeAdapter interface (github.com/Zequent/zqnt-edge-sdk-go/adapter) is the core
contract of the Go Edge SDK — the direct hardware-command surface, one method per operation. This is
the SDK's narrower API shape (see
Overview); commands are called directly by method name, not routed through
a Skill Contract the way EdgeAdapterService is in the Java/Python SDKs.
Zequent Backend ──(gRPC)──> adapter/grpc.Server ──(delegates)──> Your EdgeAdapter implementation
edgesdk.NewEdgeClient registers the gRPC server for you (see
Quickstart) — you never touch adapter/grpc directly, just implement
EdgeAdapter and hand it to NewEdgeClient.
Embed adapter.UnimplementedEdgeAdapter in your concrete type to get NOT_IMPLEMENTED defaults for
every method, then override only what your hardware supports:
Note the pattern: a hardware-side failure is returned as domains.Error(...) inside a successful(*CommandResult, nil) return, not as a Go error — the error return is for transport/protocol
failures. Both are distinct from NOT_IMPLEMENTED, which UnimplementedEdgeAdapter already handles
for anything you don't override.
Server-streaming — call send for each detection frame until ctx is cancelled or the stream ends; a non-nil error from send (or your own return) terminates the stream.
Capability reporting
Method
Description
GetCapabilities(ctx, sn)
Report the device's current capability snapshot (*domains.CurrentCapabilities)
Go's Capability struct is near-parity with Java's, not a bare 2-value schema — confirmed
field-for-field against adapter/domains/capability.go: Command, Description, Available,
UnavailableReason, Metadata, TargetType, TargetRef, SchemaVersion all exist here exactly
as they do on Java's Capability. The only fields Go is missing are the three JSON-Schema-shaped
ones — constraints, inputSchema, outputSchema.
Task execution
Method
Description
PrepareTask(ctx, taskID, tid string)
Prepare a task before starting it
StartTask(ctx, taskID, tid string)
Start executing a task
PauseTask(ctx, taskID, tid string)
Pause a running task
ResumeTask(ctx, taskID, tid string)
Resume a paused task
StopTask(ctx, taskID string)
Stop a running task
These correspond to the platform's Mission/Task model — see
Overview for what that means for this SDK.
Custom commands
Method
Description
SendCustomCommand(ctx, *CustomCommandRequest)
Handle a command that doesn't map to a standard method above. CustomCommandRequest carries SN, TID, CommandID, an optional TargetRef, and Params map[string]any