trpc.group/trpc-go/trpc-go@v1.0.3/naming/selector/README.md (about) 1 # Selector Interface 2 3 Selector selects a node by service name, it internally calls service discovery, load balance and circuit breaker. 4 5 ``` 6 // Selector is the interface to select a node from service name. 7 type Selector interface { 8 // Select selects a node from service name. 9 Select(serviceName string, opt ...Option) (*registry.Node, error) 10 // Report reports request status. 11 Report(node *registry.Node, cost time.Duration, success error) error 12 } 13 ```