Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPoolAtMaxCapacity = fmt.Errorf("cannot assign any more resource from warm pool") ErrResourceAreBeingCooledDown = fmt.Errorf("cannot assign resource now, resources are being cooled down") ErrResourcesAreBeingCreated = fmt.Errorf("cannot assign resource now, resources are being created") ErrWarmPoolEmpty = fmt.Errorf("warm pool is empty") ErrResourceAlreadyAssigned = fmt.Errorf("resource is already assigned to the requestor") ErrResourceDoesntExist = fmt.Errorf("requested resource doesn't exist in used pool") ErrIncorrectResourceOwner = fmt.Errorf("resource doesn't belong to the requestor") )
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool interface { AssignResource(requesterID string) (resourceID string, shouldReconcile bool, err error) FreeResource(requesterID string, resourceID string) (shouldReconcile bool, err error) UpdatePool(job *worker.WarmPoolJob, didSucceed bool) (shouldReconcile bool) ReconcilePool() *worker.WarmPoolJob ProcessCoolDownQueue() bool }
Click to show internal directories.
Click to hide internal directories.