Documentation
¶
Overview ¶
Package main demonstrates the service-discovery (sd) components without any external dependency (no Consul, no network):
- sd/instance.Cache — in-memory Instancer for testing
- sd/endpointer — wires Instancer → EndpointCache
- sd/endpointer/balancer — lock-free RoundRobin
- sd/endpointer/executor — Retry, RetryAlways, RetryWithCallback
- sd.NewEndpoint — one-liner that wires everything together
- endpoint.InvalidateOnError — cache invalidation on SD errors
Run:
go run ./examples/sd
Click to show internal directories.
Click to hide internal directories.