mkdir gnalloy-app && cd gnalloy-app
go mod init example.com/gnalloy-app
go get gnalloy.org/examples@dev
go doc gnalloy.org/examplesThe current source tree exposes these package import paths:
gnalloy.org/examples/bench-clientgnalloy.org/examples/custom-ip-protognalloy.org/examples/doq-querygnalloy.org/examples/echognalloy.org/examples/fixed-lengthgnalloy.org/examples/http1gnalloy.org/examples/icmp-pinggnalloy.org/examples/internal/benchclientgnalloy.org/examples/internal/exampleconfiggnalloy.org/examples/internal/smokeclientgnalloy.org/examples/internal/stresscheckgnalloy.org/examples/internal/stressclientgnalloy.org/examples/length-fieldgnalloy.org/examples/line-framegnalloy.org/examples/mqtt-framegnalloy.org/examples/parity-benchgnalloy.org/examples/protobuf-varintgnalloy.org/examples/protocol-exchangegnalloy.org/examples/raw-ip-dumpgnalloy.org/examples/redis-respgnalloy.org/examples/smoke-clientgnalloy.org/examples/stress-checkgnalloy.org/examples/stress-clientgnalloy.org/examples/udp-echognalloy.org/examples/websocket
Use go doc against the package that matches the behavior you need:
go doc gnalloy.org/examples/bench-client
go doc gnalloy.org/examples/custom-ip-proto
go doc gnalloy.org/examples/doq-query
go doc gnalloy.org/examples/echo
go doc gnalloy.org/examples/fixed-length
go doc gnalloy.org/examples/http1
go doc gnalloy.org/examples/icmp-ping
go doc gnalloy.org/examples/internal/benchclientSelected current exported entry points:
var ErrInvalidProtocol = errors.New("gnalloy/examples: invalid bench protocol") ...type Config struct{ ... }type Protocol stringtype Result struct{ ... }var ErrInvalidBackend = errors.New("gnalloy/examples: invalid backend") ...func BackendLabel(backend transport.BackendKind) stringfunc ParseBackend(name string) (transport.BackendKind, error)type Options struct{ ... }var ErrInvalidProtocol = errors.New("gnalloy/examples: invalid smoke protocol") ...func Run(ctx context.Context, cfg Config) errortype Config struct{ ... }type Protocol stringconst ProtocolBoth stressclient.Protocol = "both"var ErrLeakDetected = errors.New("gnalloy/examples: stress leak detected") ...type Config struct{ ... }type Result struct{ ... }var ErrInvalidProtocol = errors.New("gnalloy/examples: invalid stress protocol") ...type Config struct{ ... }
Repository tests are executable examples of supported behavior. Start with the selected names below, then read the matching _test.go files for complete setup and assertions. See Testing and Performance for the complete discovered list.
GOWORK=off GOTOOLCHAIN=local go test ./... -run Test -count=1Selected current test, benchmark, fuzz, and example entry points:
TestConfigRejectsInvalidScenarioTestConfigValidateTestExchangeFixedTestExchangeHTTP1TestExchangeLengthFieldTestExchangeLineTestExchangeMQTTTestExchangeRawTestExchangeRedisTestExchangeRejectsInvalidProtocolTestExchangeWebSocketTestHostForSNIUsesHostPartTestOptionsResolveRejectsFixedBuffersWithoutIOUringMmapTestOptionsResolveRejectsInvalidSizesTestOptionsTCPConfigEnablesFixedBuffersTestOptionsWriteBufferWatermarkFlowsToConfigsTestParseBackendNamesTestParseBackendRejectsUnknownName
Direct Gnalloy dependencies for this module:
gnalloy.org/benchmarksgnalloy.org/codec-dnsgnalloy.org/codec-http1gnalloy.org/codec-icmpgnalloy.org/codec-ipgnalloy.org/codec-mqttgnalloy.org/codec-protobufgnalloy.org/codec-redisgnalloy.org/codec-websocketgnalloy.org/gnalloygnalloy.org/protocolgnalloy.org/resolver-dns-quicgnalloy.org/transport-l2gnalloy.org/transport-quicgnalloy.org/transport-rawgnalloy.org/transport-tcpgnalloy.org/transport-udp
Assembly guidance:
- Use runnable example commands as smoke clients and integration references.
- Examples should stay small, explicit, and close to the public APIs they exercise.
- Production services should copy the structure, not hard-code example defaults.
For sustained load, wire this module into a scenario under gnalloy.org/benchmarks or a runnable client under gnalloy.org/examples when the module participates in network traffic. Record host, OS, CPU, Go version, protocol, payload, concurrency, warmup, repetitions, throughput, and p99 latency in the report.