Documentation
¶
Index ¶
- type Manager
- func (m *Manager) Claim(image string) (*WarmContainer, bool)
- func (m *Manager) Flush(ctx context.Context, profile string) error
- func (m *Manager) RecordCreation(image string)
- func (m *Manager) Resize(ctx context.Context, profile string, count int) error
- func (m *Manager) Start(ctx context.Context) error
- func (m *Manager) Statuses() []Status
- func (m *Manager) Stop(ctx context.Context)
- type Status
- type WarmContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager maintains a warm pool of pre-started containers.
func NewManager ¶
func NewManager(runtimes map[string]runtime.Runtime, cfg config.PoolConfig, log *slog.Logger) *Manager
NewManager creates a new pool manager.
func (*Manager) Claim ¶
func (m *Manager) Claim(image string) (*WarmContainer, bool)
Claim attempts to grab a warm container for the given image. It performs a liveness ping before returning. If the container is dead, it's discarded and the next one is tried.
func (*Manager) RecordCreation ¶
RecordCreation records that a sandbox was created for the given image.
Click to show internal directories.
Click to hide internal directories.