Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoUnleasedPods = errors.New("no unleased pods found")
)
Functions ¶
This section is empty.
Types ¶
type AutoscalingPool ¶ added in v0.1.17
type AutoscalingPool struct {
// contains filtered or unexported fields
}
func NewPool ¶
func NewPool( ctx context.Context, clientset kubernetes.Interface, conf config.Buildkit, opts ...PoolOption, ) *AutoscalingPool
NewPool creates a new worker pool that can be used to lease buildkit workers for image builds.
func (*AutoscalingPool) Close ¶ added in v0.1.17
func (p *AutoscalingPool) Close()
Close shuts down the pool by terminating all background routines used to manage requests and garbage collection.
func (*AutoscalingPool) Get ¶ added in v0.1.17
Get a lease for a worker in the pool and return a routable address.
Adds "lease"/"manager-identity" metadata and removes "expiry-time". The worker will remain leased until the caller provides the address to Release().
func (*AutoscalingPool) Release ¶ added in v0.1.17
func (p *AutoscalingPool) Release(ctx context.Context, addr string) error
Release an address back into the worker pool.
Adds "expiry-time" and removes "lease"/"manager-identity" metadata. The underlying worker will be terminated after its expiry time has passed.
type PodRequest ¶ added in v0.1.4
type PodRequest struct {
// contains filtered or unexported fields
}
type PodRequestResult ¶
type PodRequestResult struct {
// contains filtered or unexported fields
}
type PoolOption ¶
func EndpointWatchTimeoutSeconds ¶ added in v0.1.16
func EndpointWatchTimeoutSeconds(s int64) PoolOption
func Logger ¶
func Logger(log logr.Logger) PoolOption
func MaxIdleTime ¶
func MaxIdleTime(d time.Duration) PoolOption
func SyncWaitTime ¶
func SyncWaitTime(d time.Duration) PoolOption
type Queue ¶ added in v0.1.14
type Queue struct {
// contains filtered or unexported fields
}
func NewRequestQueue ¶
func NewRequestQueue() *Queue
func (*Queue) Dequeue ¶ added in v0.1.14
func (q *Queue) Dequeue() *PodRequest
func (*Queue) Enqueue ¶ added in v0.1.14
func (q *Queue) Enqueue(req *PodRequest)
func (*Queue) Remove ¶ added in v0.1.14
func (q *Queue) Remove(req *PodRequest) bool
type RequestQueue ¶
type RequestQueue interface { Enqueue(*PodRequest) Dequeue() *PodRequest Len() int Remove(*PodRequest) bool }
Click to show internal directories.
Click to hide internal directories.