Index: state/api/uniter/uniter.go |
=== modified file 'state/api/uniter/uniter.go' |
--- state/api/uniter/uniter.go 2013-09-09 12:37:00 +0000 |
+++ state/api/uniter/uniter.go 2013-09-10 16:50:30 +0000 |
@@ -156,3 +156,13 @@ |
func (st *State) Environment() (*Environment, error) { |
return &Environment{st}, nil |
} |
+ |
+// APIAddresses returns the list of addresses used to connect to the API. |
+func (st *State) APIAddresses() ([]string, error) { |
+ var result params.StringsResult |
+ err := st.caller.Call("Uniter", "", "APIAddresses", nil, &result) |
+ if err != nil { |
+ return nil, err |
+ } |
+ return result.Result, nil |
+} |