MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / getNetProto

Function getNetProto

IceFireDB-SQLProxy/pkg/mysql/client/conn.go:44–50  ·  view source on GitHub ↗
(addr string)

Source from the content-addressed store, hash-verified

42type SelectPerRowCallback func(row []FieldValue) error
43
44func getNetProto(addr string) string {
45 proto := "tcp"
46 if strings.Contains(addr, "/") {
47 proto = "unix"
48 }
49 return proto
50}
51
52// Connect to a MySQL server, addr can be ip:port, or a unix socket domain like /var/sock.
53// Accepts a series of configuration functions as a variadic argument.

Callers 1

ConnectFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected