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/custom-ip-protognalloy.org/examples/doq-querygnalloy.org/examples/echognalloy.org/examples/fixed-lengthgnalloy.org/examples/http1gnalloy.org/examples/icmp-pinggnalloy.org/examples/internal/exampleconfiggnalloy.org/examples/internal/smokeclientgnalloy.org/examples/length-fieldgnalloy.org/examples/line-framegnalloy.org/examples/mqtt-framegnalloy.org/examples/protobuf-varintgnalloy.org/examples/protocol-exchangegnalloy.org/examples/raw-ip-dumpgnalloy.org/examples/redis-respgnalloy.org/examples/smoke-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/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-pingSelected current exported entry points:
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 string
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, fuzz, and example entry points:
TestExchangeFixedTestExchangeHTTP1TestExchangeLengthFieldTestExchangeLineTestExchangeMQTTTestExchangeRawTestExchangeRedisTestExchangeRejectsInvalidProtocolTestExchangeWebSocketTestHostForSNIUsesHostPartTestOptionsResolveRejectsFixedBuffersWithoutIOUringMmapTestOptionsResolveRejectsInvalidSizesTestOptionsTCPConfigEnablesFixedBuffersTestOptionsWriteBufferWatermarkFlowsToConfigsTestParseBackendNamesTestParseBackendRejectsUnknownName
Direct Gnalloy dependencies for this module:
gnalloy.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, use the clients and scenarios in gnalloy.org/benchmarks. Record host, OS, CPU, Go version, protocol, payload, concurrency, warmup, repetitions, throughput, and p99 latency in the report.