MCPcopy Create free account
hub / github.com/CyCoreSystems/ari-proxy / maintainCluster

Method maintainCluster

client/client.go:186–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184}
185
186func (c *core) maintainCluster() (err error) {
187
188 c.annSub, err = c.mbus.SubscribeAnnounce(proxy.AnnouncementSubject(c.prefix), func(o *proxy.Announcement) {
189 c.cluster.Update(o.Node, o.Application)
190 })
191 if err != nil {
192 return eris.Wrap(err, "failed to listen to proxy announcements")
193 }
194
195 // Send an initial ping for proxy announcements
196 err = c.mbus.PublishPing(proxy.PingSubject(c.prefix))
197 if err != nil {
198 return eris.Wrap(err, "failed to publish ping")
199 }
200 return err
201}
202
203// Client provides an ari.Client for an ari-proxy server
204type Client struct {

Callers 1

StartMethod · 0.95

Calls 5

AnnouncementSubjectFunction · 0.92
PingSubjectFunction · 0.92
SubscribeAnnounceMethod · 0.65
PublishPingMethod · 0.65
UpdateMethod · 0.45

Tested by

no test coverage detected