Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMaxNumReposReached = errors.New("maximum number of repositories reached")
View Source
var ErrMaxRepoSizeReached = errors.New("maximum size of repository reached")
View Source
var WireSet = wire.NewSet( ProvideLimiter, )
Functions ¶
This section is empty.
Types ¶
type ResourceLimiter ¶
type ResourceLimiter interface { // RepoCount allows the creation of a specified number of repositories. RepoCount(ctx context.Context, spaceID int64, count int) error // RepoSize allows repository growth up to a limit for the given repoID. RepoSize(ctx context.Context, repoID int64) error }
ResourceLimiter is an interface for managing resource limitation.
func NewResourceLimiter ¶
func NewResourceLimiter() ResourceLimiter
NewResourceLimiter creates a new instance of ResourceLimiter.
func ProvideLimiter ¶
func ProvideLimiter() (ResourceLimiter, error)
Click to show internal directories.
Click to hide internal directories.