lxd/cluster/gateway.go
func (g *Gateway) DialFunc() dqlite.DialFunc {
	return func(ctx context.Context, address string) (net.Conn, error) {
		// Memory connection.
		if g.memoryDial != nil {
			return g.memoryDial(ctx, address)
		}

		return dqliteNetworkDial(ctx, address, g.cert)
	}
}
func (g *Gateway) DialFunc() dqlite.DialFunc {
	return func(ctx context.Context, address string) (net.Conn, error) {
		// Memory connection.
		if g.memoryDial != nil {
			return g.memoryDial(ctx, address)
		}

		return dqliteNetworkDial(ctx, address, g.cert)
	}
}
func ( g * Gateway ) DialFunc ( ) dqlite . DialFunc { return func ( ctx context . Context , address string ) ( net . Conn , error ) { // Memory connection. if g . memoryDial != nil { return g . memoryDial ( ctx , address ) } return dqliteNetworkDial ( ctx , address , g . cert ) } }
// DialFunc returns a dial function that can be used to connect to one of the
// dqlite nodes.
DialFunc returns a dial function that can be used to connect to one of the dqlite nodes .