Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ServiceDiscoveryOption ¶
type ServiceDiscoveryOption struct {
F func(o *ServiceDiscoveryOptions)
}
func WithCustomizedAddrs ¶
func WithCustomizedAddrs(addrs ...string) ServiceDiscoveryOption
WithCustomizedAddrs specifies the target instance addresses when doing service discovery. It overwrites the results from the Resolver
func WithLoadBalanceOptions ¶
func WithLoadBalanceOptions(lb loadbalance.Loadbalancer, options loadbalance.Options) ServiceDiscoveryOption
WithLoadBalanceOptions sets Loadbalancer and loadbalance options for hertz client
type ServiceDiscoveryOptions ¶
type ServiceDiscoveryOptions struct { // Resolver is used to client discovery Resolver discovery.Resolver // Balancer is used to client load balance Balancer loadbalance.Loadbalancer // LbOpts LoadBalance option LbOpts loadbalance.Options }
ServiceDiscoveryOptions service discovery option for client
func (*ServiceDiscoveryOptions) Apply ¶
func (o *ServiceDiscoveryOptions) Apply(opts []ServiceDiscoveryOption)
Click to show internal directories.
Click to hide internal directories.