code: func (s *Snapshotter) processMemberEvent(e MemberEvent) {
  	switch e.Type {
  	case EventMemberJoin:
  		for _, mem := range e.Members {
  			addr := net.TCPAddr{IP: mem.Addr, Port: int(mem.Port)}
  			s.aliveNodes[mem.Name] = addr.String()
  			s.tryAppend(fmt.Sprintf("alive: %s %s\n", mem.Name, addr.String()))
  		}
  
  	case EventMemberLeave:
  		fallthrough
  	case EventMemberFailed:
  		for _, mem := range e.Members {
  			delete(s.aliveNodes, mem.Name)
  			s.tryAppend(fmt.Sprintf("not-alive: %s\n", mem.Name))
  		}
  	}
  	s.updateClock()
  }
docs: // processMemberEvent is used to handle a single member event