| // Package gce provides a Profile for Google Compute Engine and should be |
| // used by binaries that only ever expect to be run on GCE. |
| "veyron/profiles/internal/gce" |
| rt.RegisterProfile(&profile{}) |
| func (p *profile) Name() string { |
| func (p *profile) Runtime() string { |
| func (p *profile) Platform() *veyron2.Platform { |
| platform, _ := profiles.Platform() |
| func (p *profile) String() string { |
| return "net " + p.Platform().String() |
| func (p *profile) Init(rt veyron2.Runtime, publisher *config.Publisher) { |
| panic("GCE profile used on a non-GCE system") |
| go addressPublisher(rt, publisher) |
| func addressPublisher(rt veyron2.Runtime, p *config.Publisher) { |
| ch := make(chan config.Setting) |
| p.CreateStream("net", "network configuration", ch) |
| // TODO(cnicolaou): publish local and external address.. |