4
"github.com/juju/errors"
5
"github.com/juju/names"
7
"github.com/juju/juju/api"
8
"github.com/juju/juju/network"
11
type mockAPIState struct {
13
close func(api.Connection) error
16
apiHostPorts [][]network.HostPort
20
func (s *mockAPIState) Close() error {
27
func (s *mockAPIState) Addr() string {
31
func (s *mockAPIState) APIHostPorts() [][]network.HostPort {
35
func (s *mockAPIState) EnvironTag() (names.EnvironTag, error) {
36
return names.ParseEnvironTag(s.environTag)
39
func (s *mockAPIState) ServerTag() (names.EnvironTag, error) {
40
return names.EnvironTag{}, errors.NotImplementedf("ServerTag")
43
func panicAPIOpen(apiInfo *api.Info, opts api.DialOpts) (api.Connection, error) {
44
panic("api.Open called unexpectedly")