MCPcopy Create free account
hub / github.com/datastax/cql-proxy / generateTestAddr

Function generateTestAddr

proxy/proxy_test.go:69–73  ·  view source on GitHub ↗
(baseAddress string, n int)

Source from the content-addressed store, hash-verified

67}
68
69func generateTestAddr(baseAddress string, n int) string {
70 ip := make(net.IP, net.IPv6len)
71 new(big.Int).Add(new(big.Int).SetBytes(net.ParseIP(baseAddress)), big.NewInt(int64(n))).FillBytes(ip)
72 return ip.String()
73}
74
75func generateTestAddrs(host string) (clusterPort int, clusterAddr, proxyAddr, httpAddr string) {
76 clusterPort = generateTestPort()

Calls 2

AddMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected