Documentation ¶
Index ¶
Constants ¶
View Source
const (
NumIPv4AddrPerPrefix = 16
)
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") ErrInsufficientCidrBlocks = fmt.Errorf("InsufficientCidrBlocks: The specified subnet does not have enough free cidr blocks to satisfy the request") 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 CoolDownResource ¶ added in v1.1.0
type IntrospectResponse ¶ added in v1.1.0
type IntrospectResponse struct { UsedResources map[string]Resource WarmResources map[string][]Resource CoolingResources []CoolDownResource }
IntrospectResponse is the pool state returned to the introspect API
type Pool ¶
type Pool interface { AssignResource(requesterID string) (resourceID string, shouldReconcile bool, err error) FreeResource(requesterID string, resourceID string) (shouldReconcile bool, err error) GetAssignedResource(requesterID string) (resourceID string, ownsResource bool) UpdatePool(job *worker.WarmPoolJob, didSucceed bool, prefixAvailable bool) (shouldReconcile bool) ReSync(resources []string) ReconcilePool() *worker.WarmPoolJob ProcessCoolDownQueue() bool SetToDraining() *worker.WarmPoolJob SetToActive(warmPoolConfig *config.WarmPoolConfig) *worker.WarmPoolJob Introspect() IntrospectResponse }
Click to show internal directories.
Click to hide internal directories.