lxd/response.go
func ForwardedResponseIfContainerIsRemote(d *Daemon, r *http.Request, project, name string) (Response, error) {
	cert := d.endpoints.NetworkCert()
	client, err := cluster.ConnectIfContainerIsRemote(d.cluster, project, name, cert)
	if err != nil {
		return nil, err
	}
	if client == nil {
		return nil, nil
	}
	return ForwardedResponse(client, r), nil
}
func ForwardedResponseIfContainerIsRemote(d *Daemon, r *http.Request, project, name string) (Response, error) {
	cert := d.endpoints.NetworkCert()
	client, err := cluster.ConnectIfContainerIsRemote(d.cluster, project, name, cert)
	if err != nil {
		return nil, err
	}
	if client == nil {
		return nil, nil
	}
	return ForwardedResponse(client, r), nil
}
func ForwardedResponseIfContainerIsRemote ( d * Daemon , r * http . Request , project , name string ) ( Response , error ) { cert := d . endpoints . NetworkCert ( ) client , err := cluster . ConnectIfContainerIsRemote ( d . cluster , project , name , cert ) if err != nil { return nil , err } if client == nil { return nil , nil } return ForwardedResponse ( client , r ) , nil }
// ForwardedResponseIfContainerIsRemote redirects a request to the node running
// the container with the given name. If the container is local, nothing gets
// done and nil is returned.
ForwardedResponseIfContainerIsRemote redirects a request to the node running the container with the given name . If the container is local nothing gets done and nil is returned .