github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/container/lxd/cluster.go (about)

     1  // Copyright 2018 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package lxd
     5  
     6  func (s *Server) ClusterSupported() bool {
     7  	return s.clusterAPISupport
     8  }
     9  
    10  // UseTargetServer returns a new Server based on the input target node name.
    11  // It is intended for use when operations must target specific nodes in a
    12  // cluster.
    13  func (s Server) UseTargetServer(name string) (*Server, error) {
    14  	logger.Debugf("creating LXD server for cluster node %q", name)
    15  	return NewServer(s.UseTarget(name))
    16  }