Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
usbip-go
command
Package main is the usbip-go client CLI entrypoint (cli-interface OpenSpec).
|
Package main is the usbip-go client CLI entrypoint (cli-interface OpenSpec). |
|
examples
|
|
|
client
command
Example client demonstrates attaching a remote USB/IP device via pkg/usbip.Importer and detaching it cleanly after a brief hold.
|
Example client demonstrates attaching a remote USB/IP device via pkg/usbip.Importer and detaching it cleanly after a brief hold. |
|
events
command
Example events demonstrates iterating over the v1-compatible Importer.Watch and Exporter.WatchSessions event-only sequences.
|
Example events demonstrates iterating over the v1-compatible Importer.Watch and Exporter.WatchSessions event-only sequences. |
|
reconnect
command
Example reconnect demonstrates AttachOptions.AutoReconnect with a custom backoff and an OnReconnect callback.
|
Example reconnect demonstrates AttachOptions.AutoReconnect with a custom backoff and an OnReconnect callback. |
|
server
command
Example server demonstrates embedding pkg/usbip.Exporter in a custom process: listen on TCP, bind a local device for export, then serve the USB/IP accept loop until SIGINT/SIGTERM.
|
Example server demonstrates embedding pkg/usbip.Exporter in a custom process: listen on TCP, bind a local device for export, then serve the USB/IP accept loop until SIGINT/SIGTERM. |
|
internal
|
|
|
adapter/kernel
Package kernel implements the Linux kernel adapter: sysfs reads/writes, netlink uevent listener, and the fd-passing handshake for usbip-host and vhci_hcd.
|
Package kernel implements the Linux kernel adapter: sysfs reads/writes, netlink uevent listener, and the fd-passing handshake for usbip-host and vhci_hcd. |
|
adapter/transport
Package transport provides context-aware TCP dial and listen primitives for USB/IP sessions.
|
Package transport provides context-aware TCP dial and listen primitives for USB/IP sessions. |
|
adapter/wire
Package wire implements the USB/IP OP-level protocol codec: opcodes, header layout, device descriptor (312 bytes), OP_REQ_DEVLIST / OP_REP_DEVLIST, and OP_REQ_IMPORT / OP_REP_IMPORT.
|
Package wire implements the USB/IP OP-level protocol codec: opcodes, header layout, device descriptor (312 bytes), OP_REQ_DEVLIST / OP_REP_DEVLIST, and OP_REQ_IMPORT / OP_REP_IMPORT. |
|
app
Package app holds the USB/IP use-case services (importer, exporter, session lifecycle, reconnect loop) and the adapter interfaces they depend on.
|
Package app holds the USB/IP use-case services (importer, exporter, session lifecycle, reconnect loop) and the adapter interfaces they depend on. |
|
netopts
Package netopts holds the TransportOptions value type and its validation.
|
Package netopts holds the TransportOptions value type and its validation. |
|
protocol
Package protocol defines USB/IP protocol values shared by the application ports and wire adapter without making the application depend on an adapter.
|
Package protocol defines USB/IP protocol values shared by the application ports and wire adapter without making the application depend on an adapter. |
|
testutil
Package testutil centralises deterministic test helpers used across the repository: fake clock, fake random source, goleak integration, and shared fixture loaders.
|
Package testutil centralises deterministic test helpers used across the repository: fake clock, fake random source, goleak integration, and shared fixture loaders. |
|
pkg
|
|
|
domain
Package domain defines the pure value objects, entities, events, and sentinel errors shared by the usbip-go library.
|
Package domain defines the pure value objects, entities, events, and sentinel errors shared by the usbip-go library. |
|
usbip
Package usbip is the public facade for the usbip-go library.
|
Package usbip is the public facade for the usbip-go library. |
|
test
|
|
|
integration/killable
command
Package main is the test-only subprocess that exercises Importer.Attach against a fake server and pauses at controllable checkpoints so the parent test can SIGKILL it at an exact instant.
|
Package main is the test-only subprocess that exercises Importer.Attach against a fake server and pauses at controllable checkpoints so the parent test can SIGKILL it at an exact instant. |
Click to show internal directories.
Click to hide internal directories.