package cache

import "sync"

var permitJoin bool
var pjMu sync.RWMutex

func SetPermitJoin(pj bool) {
	pjMu.Lock()
	defer pjMu.Unlock()

	permitJoin = pj
}

func IsPermitJoinEnabled() bool {
	pjMu.RLock()
	defer pjMu.RUnlock()

	return permitJoin
}

func GetPermitJoin() bool {
	pjMu.RLock()
	defer pjMu.RUnlock()

	return permitJoin
}
