~rogpeppe/juju-core/themue-058-debug-log-api

« back to all changes in this revision

Viewing changes to state/api/apiclient.go

  • Committer: Roger Peppe
  • Date: 2014-01-24 09:54:41 UTC
  • Revision ID: roger.peppe@canonical.com-20140124095441-g4w6kn68e53lhfqp
state/api: make it build

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        // serverHostPort holds the cached API server address and port we used
41
41
        // to login
42
42
        serverHostPort string
 
43
 
 
44
        websocketConfig websocket.Config
43
45
}
44
46
 
45
47
// Info encapsulates information about a server holding juju state and
93
95
}
94
96
 
95
97
func Open(info *Info, opts DialOpts) (*State, error) {
 
98
 
96
99
        // TODO Select a random address from info.Addrs
97
100
        // and only fail when we've tried all the addresses.
98
101
        // TODO what does "origin" really mean, and is localhost always ok?
130
133
 
131
134
        client := rpc.NewConn(jsoncodec.NewWebsocket(conn), nil)
132
135
        client.Start()
 
136
        // TODO store appropriate websocket config in State.
133
137
        st := &State{
134
138
                client:         client,
135
139
                conn:           conn,