mirror of
https://github.com/status-im/consul.git
synced 2025-01-24 20:51:10 +00:00
f936ca5aea
Extracted from 936522a13c07e8b732b6fde61bba23d05f7b9a70 Co-authored-by: Paul Banks <banks@banksco.de>
21 lines
593 B
Go
21 lines
593 B
Go
package router
|
|
|
|
import "github.com/hashicorp/consul/agent/metadata"
|
|
|
|
// ServerTracker is a wrapper around consul.ServerResolverBuilder to prevent a
|
|
// cyclic import dependency.
|
|
type ServerTracker interface {
|
|
AddServer(*metadata.Server)
|
|
RemoveServer(*metadata.Server)
|
|
}
|
|
|
|
// NoOpServerTracker is a ServerTracker that does nothing. Used when gRPC is not
|
|
// enabled.
|
|
type NoOpServerTracker struct{}
|
|
|
|
// AddServer implements ServerTracker
|
|
func (NoOpServerTracker) AddServer(*metadata.Server) {}
|
|
|
|
// RemoveServer implements ServerTracker
|
|
func (NoOpServerTracker) RemoveServer(*metadata.Server) {}
|