package limits import ( "fmt" "github.com/openziti/zrok/controller/store" ) type configResourceCountClass struct { cfg *Config } func newConfigResourceCountClass(cfg *Config) store.ResourceCountClass { return &configResourceCountClass{cfg} } func (rcc *configResourceCountClass) IsGlobal() bool { return true } func (rcc *configResourceCountClass) GetLimitClassId() int { return -1 } func (rcc *configResourceCountClass) GetEnvironments() int { return rcc.cfg.Environments } func (rcc *configResourceCountClass) GetShares() int { return rcc.cfg.Shares } func (rcc *configResourceCountClass) GetReservedShares() int { return rcc.cfg.ReservedShares } func (rcc *configResourceCountClass) GetUniqueNames() int { return rcc.cfg.UniqueNames } func (rcc *configResourceCountClass) String() string { return fmt.Sprintf("Config", rcc.cfg.Environments, rcc.cfg.Shares, rcc.cfg.ReservedShares, rcc.cfg.UniqueNames) }