Esempio n. 1
0
func NewDNSPodClient(addr string, apiToken string) *DNSPodClient {
	connection := rpc.NewClient(NewDNSPODAnalyzer())
	return &DNSPodClient{
		loginToken: apiToken,
		addr:       addr,
		conn:       connection,
	}
}
Esempio n. 2
0
func NewClient(host string, port int) *Client {
	connection := rpc.NewClient(rpc.H2OAnalyser{})
	clt := &Client{
		addr: fmt.Sprintf("%s:%d", host, port),
		conn: connection,
	}
	return clt
}
Esempio n. 3
0
func NewDNSPodClient(addr string, cache Cache) *DNSPodClient {
	connection := rpc.NewClient(NewDNSPODAnalyzer())
	return &DNSPodClient{
		cache: cache,
		addr:  addr,
		conn:  connection,
	}
}
Esempio n. 4
0
func NewClient(addr string) *Client {
	connection := rpc.NewClient(rpc.H2OAnalyser{})
	clt := &Client{
		addr: addr,
		conn: connection,
	}
	return clt
}
Esempio n. 5
0
func NewClient(workdir string, host string, port int) *Client {
	connection := rpc.NewClient(Analyser{})
	cli := &Client{
		workdir: workdir,
		addr:    fmt.Sprintf("%s:%d", host, port),
		conn:    connection,
	}
	return cli
}