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

Method runAnnouncer

server/server.go:248–260  ·  view source on GitHub ↗

runAnnouncer runs the periodic discovery announcer

(ctx context.Context)

Source from the content-addressed store, hash-verified

246
247// runAnnouncer runs the periodic discovery announcer
248func (s *Server) runAnnouncer(ctx context.Context) {
249 ticker := time.NewTicker(proxy.AnnouncementInterval)
250 defer ticker.Stop()
251
252 for {
253 select {
254 case <-ctx.Done():
255 return
256 case <-ticker.C:
257 s.announce()
258 }
259 }
260}
261
262// announce publishes the presence of this server to the cluster
263func (s *Server) announce() {

Callers 1

listenMethod · 0.95

Calls 3

announceMethod · 0.95
DoneMethod · 0.80
StopMethod · 0.45

Tested by

no test coverage detected