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

Method localIP

proxy/proxy.go:749–762  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

747}
748
749func (c *client) localIP() net.IP {
750 if c.proxy.localNode.addr != nil {
751 return c.proxy.localNode.addr.IP
752 } else {
753 switch a := c.conn.LocalAddr().(type) {
754 case *net.TCPAddr:
755 return a.IP
756 case *net.IPAddr:
757 return a.IP
758 default:
759 panic("unhandled local address type")
760 }
761 }
762}
763
764func (c *client) filterSystemPeerValues(stmt *parser.SelectStatement, filtered []*message.ColumnMetadata, peer *node, peerCount int) (row []message.Column, err error) {
765 return parser.FilterValues(stmt, filtered, func(name string) (value message.Column, err error) {

Callers 1

Calls 1

LocalAddrMethod · 0.80

Tested by

no test coverage detected