func (s *state) APIHostPorts() []network.MachineHostPorts {
	// NOTE: We're making a copy of s.hostPorts before returning it,
	// for safety.
	hostPorts := make([]network.MachineHostPorts, len(s.hostPorts))
	for i, servers := range s.hostPorts {
		hostPorts[i] = append(network.MachineHostPorts{}, servers...)
	}
	return hostPorts
}
// APIHostPorts returns addresses that may be used to connect
// to the API server, including the address used to connect.
//
// The addresses are scoped (public, cloud-internal, etc.), so
// the client may choose which addresses to attempt. For the
// Juju CLI, all addresses must be attempted, as the CLI may
// be invoked both within and outside the model (think
// private clouds).
APIHostPorts returns addresses that may be used to connect
to the API server, including the address used to connect.

The addresses are scoped (public, cloud-internal, etc.), so
the client may choose which addresses to attempt. For the
Juju CLI, all addresses must be attempted, as the CLI may
be invoked both within and outside the model (think
private clouds).
// APIHostPorts returns addresses that may be used to connect // to the API server including the address used to connect . // // The addresses are scoped ( public cloud - internal etc . ) so // the client may choose which addresses to attempt . For the // Juju CLI all addresses must be attempted as the CLI may // be invoked both within and outside the model ( think // private clouds ) .
func (s *state) APIHostPorts() []network.MachineHostPorts {
	hostPorts := make([]network.MachineHostPorts, len(s.hostPorts))
	for i, servers := range s.hostPorts {
		hostPorts[i] = append(network.MachineHostPorts{}, servers...)
	}
	return hostPorts
}
func ( s * state ) APIHostPorts ( ) [ ] network . MachineHostPorts { hostPorts := make ( [ ] network . MachineHostPorts , len ( s . hostPorts ) ) for i , servers := range s . hostPorts { hostPorts [ i ] = append ( network . MachineHostPorts { } , servers ... ) } return hostPorts }
APIHostPorts returns addresses that may be used to connect
to the API server, including the address used to connect.
APIHostPorts returns addresses that may be used to connect to the API server including the address used to connect .
// NOTE: We're making a copy of s.hostPorts before returning it, // for safety.