예제 #1
0
// Create a new AgentClient.
func NewLBClient(addr string) (*LBClient, error) {
	client, err := rpcutils.GetCachedClient(addr)
	if err != nil {
		return nil, err
	}
	s := new(LBClient)
	s.addr = addr
	s.rpcClient = client
	return s, nil
}
예제 #2
0
// Create a new AgentClient.
func NewAgentClient(addr string) (s *AgentClient, err error) {
	client, err := rpcutils.GetCachedClient(addr)
	if err != nil {
		return nil, err
	}
	s = new(AgentClient)
	s.addr = addr
	s.rpcClient = client
	return s, nil
}