github.com/rogpeppe/juju@v0.0.0-20140613142852-6337964b789e/worker/peergrouper/publish.go (about) 1 // Copyright 2014 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package peergrouper 5 6 import ( 7 "github.com/juju/juju/instance" 8 "github.com/juju/juju/network" 9 "github.com/juju/juju/state" 10 ) 11 12 type publisher struct { 13 st *state.State 14 } 15 16 func newPublisher(st *state.State) *publisher { 17 return &publisher{ 18 st: st, 19 } 20 } 21 22 func (pub *publisher) publishAPIServers(apiServers [][]network.HostPort, instanceIds []instance.Id) error { 23 // TODO(rog) publish instanceIds in environment storage. 24 return pub.st.SetAPIHostPorts(apiServers) 25 }