Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnknownPolicy balancePolicy = iota RobinPolicy RandPolicy )
Variables ¶
View Source
var NewBalancePolicyCallOpt = BalancePolicyCallOpt
View Source
var NewTagCallOpt = TagCallOpt
Functions ¶
This section is empty.
Types ¶
type CallOpt ¶
type CallOpt func(*ConsulResolver) error
func BalancePolicyCallOpt ¶
func BalancePolicyCallOpt(balancePolicy balancePolicy) CallOpt
func PassingOnlyCallOpt ¶
func TagCallOpt ¶
type ConsulResolver ¶
type ConsulResolver struct {
// contains filtered or unexported fields
}
func NewConsulResolver ¶
func NewConsulResolver(serviceName, address string, opts ...CallOpt) (*ConsulResolver, error)
func (*ConsulResolver) Addresses ¶
func (consulResolver *ConsulResolver) Addresses() []string
func (*ConsulResolver) Close ¶
func (consulResolver *ConsulResolver) Close()
func (*ConsulResolver) GetAddress ¶
func (consulResolver *ConsulResolver) GetAddress() (address string, err error)
func (*ConsulResolver) HasTag ¶
func (consulResolver *ConsulResolver) HasTag(tag string) bool
Click to show internal directories.
Click to hide internal directories.