lxd/rbac/server.go
func (r *Server) StartStatusCheck() {
	// Initialize the last changed timestamp
	r.hasStatusChanged()

	r.statusDone = make(chan int)
	go func() {
		for {
			select {
			case <-r.statusDone:
				return
			case <-time.After(time.Minute):
				if r.hasStatusChanged() {
					r.flushCache()
				}
			}
		}
	}()
}
func (r *Server) StartStatusCheck() {
	// Initialize the last changed timestamp
	r.hasStatusChanged()

	r.statusDone = make(chan int)
	go func() {
		for {
			select {
			case <-r.statusDone:
				return
			case <-time.After(time.Minute):
				if r.hasStatusChanged() {
					r.flushCache()
				}
			}
		}
	}()
}
func ( r * Server ) StartStatusCheck ( ) { // Initialize the last changed timestamp r . hasStatusChanged ( ) r . statusDone = make ( chan int ) go func ( ) { for { select { case <- r . statusDone : return case <- time . After ( time . Minute ) : if r . hasStatusChanged ( ) { r . flushCache ( ) } } } } ( ) }
// StartStatusCheck starts a periodic status checker.
StartStatusCheck starts a periodic status checker .