~wallyworld/juju-core/1304742-backport-1.18

« back to all changes in this revision

Viewing changes to state/open.go

  • Committer: Roger Peppe
  • Date: 2012-09-19 13:40:41 UTC
  • mto: This revision was merged to the branch mainline in revision 527.
  • Revision ID: roger.peppe@canonical.com-20120919134041-1rt4cg7ox52pt4os
mstate: rename to state

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
package mstate
 
1
package state
2
2
 
3
3
import (
4
4
        "errors"
8
8
        "labix.org/v2/mgo"
9
9
        "labix.org/v2/mgo/txn"
10
10
        "launchpad.net/juju-core/log"
11
 
        "launchpad.net/juju-core/mstate/presence"
12
 
        "launchpad.net/juju-core/mstate/watcher"
 
11
        "launchpad.net/juju-core/state/presence"
 
12
        "launchpad.net/juju-core/state/watcher"
13
13
)
14
14
 
15
15
// Info encapsulates information about cluster of
29
29
// info, waits for it to be initialized, and returns a new State
30
30
// representing the environment connected to.
31
31
func DialInfo(info *Info) (*State, error) {
32
 
        log.Printf("mstate: opening state; mongo addresses: %q", info.Addrs)
 
32
        log.Printf("state: opening state; mongo addresses: %q", info.Addrs)
33
33
        if len(info.Addrs) == 0 {
34
34
                return nil, errors.New("no mongo addresses")
35
35
        }