Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func New ¶
New creates and returns a new Agent with the specified name and tags. The other parameters are required to establish a GRPC connection to the load balancer registry.
func (*Agent) RegisterUtilization ¶
func (a *Agent) RegisterUtilization(dimension string, kind lbpb.Utilization_Kind, fn UtilFunc)
RegisterUtilization registers an utilization callback for the specified dimension. Must be called before Start(). Registering multiple callbacks for the same dimension will produce unpredictable results.
func (*Agent) SetUpdateInterval ¶
SetUpdateInterval tells the Agent how often to send status updates. Must be called before Start().
type Dialer ¶
type Dialer interface { Update(context.Context, *lbpb.NodeStatus) error Close() }
func NewGRPCDialer ¶
func NewGRPCDialer(lbAddr string, grpcOpts ...grpc.DialOption) (Dialer, error)
Click to show internal directories.
Click to hide internal directories.