i want to use golang aerospike with 4 server local , i can connect this using PHP code like this
#CONFIG FOR AEROSPIKE CONNECTION
$CONF['aerospike_server'] = array(
'hosts' => array(
array(
'addr' => '192.168.7.241',
'port' => 3000
),
array(
'addr' => '192.168.7.243',
'port' => 3000
),
array(
'addr' => '192.168.7.244',
'port' => 3000
),
array(
'addr' => '192.168.7.245',
'port' => 3000
)
)
);
$aeroDB = new Aerospike($CONF['aerospike_server']);
how do i do this using golang ? im using this https://github.com/aerospike/aerospike-client-go also i read in reference does have NewClientWithPolicyAndHost and NewHosts but cannot find the example or how to use it.
i am using go version go1.17 linux/amd64