- Go 1.25 or newer, matching the module
godirective. - A Gnalloy application, recipe, example, or benchmark harness that owns lifecycle and deployment configuration.
- Standalone module verification should set
GOWORK=offso the module is tested through its published dependency graph.
go get gnalloy.org/examples@devimport "gnalloy.org/examples"- Configure bind addresses, target addresses, payload sizes, duration, concurrency, and protocol options from command-line flags or environment-specific wrappers.
- Treat examples as executable documentation; production services should own their own configuration schema.
Use the API inventory to choose the exact constructor or option type for your protocol path:
go doc gnalloy.org/examplesCommon current entry points:
var ErrInvalidProtocol = errors.New("gnalloy/examples: invalid bench protocol") ...type Config struct{ ... }var ErrInvalidBackend = errors.New("gnalloy/examples: invalid backend") ...type Options struct{ ... }var ErrInvalidProtocol = errors.New("gnalloy/examples: invalid smoke protocol") ...type Config struct{ ... }const ProtocolBoth stressclient.Protocol = "both"var ErrLeakDetected = errors.New("gnalloy/examples: stress leak detected") ...type Config struct{ ... }var ErrInvalidProtocol = errors.New("gnalloy/examples: invalid stress protocol") ...type Config struct{ ... }
When multiple Gnalloy repositories are developed together, create a local go.work file in your chosen workspace. Keep application-local replace directives out of published library modules unless the change is intentionally temporary and never committed.
Network input, peer behavior, platform capability, and timeout failures must be handled as normal errors. Do not recover protocol correctness by panicking. Return or propagate the module error and close the affected Channel when ownership requires it.