func()

in ringpop.go [363:378]


func (rp *Ringpop) setState(s state) {
	rp.stateMutex.Lock()
	oldState := rp.state
	rp.state = s
	rp.stateMutex.Unlock()

	// test if the state has changed with this call to setState
	if oldState != s {
		switch s {
		case ready:
			rp.EmitEvent(events.Ready{})
		case destroyed:
			rp.EmitEvent(events.Destroyed{})
		}
	}
}