wip: migrate to mono-repo. SPN has already been moved to spn/
This commit is contained in:
30
spn/conf/mode.go
Normal file
30
spn/conf/mode.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/tevino/abool"
|
||||
)
|
||||
|
||||
var (
|
||||
publicHub = abool.New()
|
||||
client = abool.New()
|
||||
)
|
||||
|
||||
// PublicHub returns whether this is a public Hub.
|
||||
func PublicHub() bool {
|
||||
return publicHub.IsSet()
|
||||
}
|
||||
|
||||
// EnablePublicHub enables the public hub mode.
|
||||
func EnablePublicHub(enable bool) {
|
||||
publicHub.SetTo(enable)
|
||||
}
|
||||
|
||||
// Client returns whether this is a client.
|
||||
func Client() bool {
|
||||
return client.IsSet()
|
||||
}
|
||||
|
||||
// EnableClient enables the client mode.
|
||||
func EnableClient(enable bool) {
|
||||
client.SetTo(enable)
|
||||
}
|
||||
Reference in New Issue
Block a user