Exemplo n.º 1
0
func NewDNSPodClient(addr string, apiToken string) *DNSPodClient {
	connection := rpc.NewClient(NewDNSPODAnalyzer())
	return &DNSPodClient{
		loginToken: apiToken,
		addr:       addr,
		conn:       connection,
	}
}
Exemplo 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
}
Exemplo n.º 3
0
func NewDNSPodClient(addr string, cache Cache) *DNSPodClient {
	connection := rpc.NewClient(NewDNSPODAnalyzer())
	return &DNSPodClient{
		cache: cache,
		addr:  addr,
		conn:  connection,
	}
}
Exemplo n.º 4
0
func NewClient(addr string) *Client {
	connection := rpc.NewClient(rpc.H2OAnalyser{})
	clt := &Client{
		addr: addr,
		conn: connection,
	}
	return clt
}
Exemplo 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
}