processmanager

package
v1.0.0-rc.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2026 License: EPL-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IntervalInMinutes is the time window for checking stuck restarts
	IntervalInMinutes = 10
	// AbnormalNumberOfRestarts is the threshold for considering a microservice stuck
	AbnormalNumberOfRestarts = 10
)
View Source
const (
	ContainerManagerModuleName = "Container Manager"
)
View Source
const ExecStartGateTimeout = 15 // seconds — use with time.Second in callers
View Source
const (
	ProcessManagerModuleName = "Process Manager"
)

Variables

View Source
var (
	ErrExecSessionNotFound      = errors.New("exec session not found")
	ErrExecSessionOwnerMismatch = errors.New("exec session owner mismatch")
	ErrExecSessionDuplicate     = errors.New("exec session already registered")
	ErrExecStartTimeout         = errors.New("exec start timeout")
)
View Source
var ErrControlPlaneNotFound = errors.New("control plane deployment not found")

Functions

func ConfigureControlPlaneRestartForTest

func ConfigureControlPlaneRestartForTest(eng engine.ContainerEngine, engineName string, recreateFn func(*models.ControlPlaneDeployment, bool, int64) error)

ConfigureControlPlaneRestartForTest wires engine metadata and optional recreate hook for facade restart tests.

func ConfigureEngineForTest

func ConfigureEngineForTest(eng engine.ContainerEngine)

ConfigureEngineForTest wires a test engine into the process manager singleton.

func IsControllerWorkload

func IsControllerWorkload(labels map[string]string, containerID, image string, dep *models.ControlPlaneDeployment) bool

IsControllerWorkload reports whether labels, container ID, and image match the singleton control plane deployment record (full controller identity).

func IsEdgeletSelfContainer

func IsEdgeletSelfContainer(labels map[string]string, containerImage string) bool

IsEdgeletSelfContainer reports whether the container is the edgelet daemon running inside its own image (EDGELET_DAEMON=container). Set EDGELET_IMAGE on the host container to the image ref used at deploy time so the watchdog can skip self-removal.

func IsQuiesced

func IsQuiesced() bool

IsQuiesced reports whether reconcile is paused (e.g. pending engine restart).

func RegisterExecSessionForTest

func RegisterExecSessionForTest(rec *ExecSessionRecord) error

RegisterExecSessionForTest inserts a registry row for handler/integration tests.

func ResetExecRegistryForTest

func ResetExecRegistryForTest()

ResetExecRegistryForTest clears the exec session registry on the singleton.

func ResetExecStartGateTimeoutForTest

func ResetExecStartGateTimeoutForTest()

ResetExecStartGateTimeoutForTest restores the production sync start gate duration.

func ResetProcessManagerEngineForTest

func ResetProcessManagerEngineForTest()

ResetProcessManagerEngineForTest clears test engine wiring on the singleton so later tests that expect an uninitialized process manager are not polluted.

func SetExecStartGateTimeoutForTest

func SetExecStartGateTimeoutForTest(d time.Duration)

SetExecStartGateTimeoutForTest shortens the sync start gate for unit tests.

func SetQuiesced

func SetQuiesced(v bool)

SetQuiesced blocks or resumes reconcile scheduling.

Types

type ContainerManager

type ContainerManager struct {
	// contains filtered or unexported fields
}

ContainerManager manages container operations via a ContainerEngine.

func NewContainerManager

func NewContainerManager(eng engine.ContainerEngine, microserviceManager MicroserviceManagerInterface, engineName string) *ContainerManager

NewContainerManager creates a new ContainerManager

func (*ContainerManager) AddContainer

func (cm *ContainerManager) AddContainer(ctx context.Context, ms *models.Microservice) error

AddContainer creates and starts a container for a microservice. It holds IsUpdating=true for the duration so the reconciliation loop treats this microservice as "in-flight" and does not enqueue a second ADD task.

func (*ContainerManager) GetContainerForMicroservice

func (cm *ContainerManager) GetContainerForMicroservice(microserviceUUID string) (*engine.Container, error)

GetContainerForMicroservice returns the container for a microservice, using DB-first lookup when available (iofog engine) with label-based fallback.

func (*ContainerManager) KillContainerByMicroserviceUUID

func (cm *ContainerManager) KillContainerByMicroserviceUUID(ctx context.Context, microserviceUUID string) error

KillContainerByMicroserviceUUID forcefully stops a container by microservice UUID.

func (*ContainerManager) RecreateContainer

func (cm *ContainerManager) RecreateContainer(ctx context.Context, ms *models.Microservice, opts RecreateOptions) (string, error)

RecreateContainer removes an existing workload container when present, then creates and starts a new one from the microservice spec.

func (*ContainerManager) RemoveContainerByID

func (cm *ContainerManager) RemoveContainerByID(ctx context.Context, containerID string, withCleanup bool, removeImage bool) error

RemoveContainerByID removes a container by concrete engine-assigned container ID. This is primarily used by watchdog unknown-container cleanup where there is no guaranteed iofog microservice UUID mapping.

func (*ContainerManager) RemoveContainerByMicroserviceUUID

func (cm *ContainerManager) RemoveContainerByMicroserviceUUID(ctx context.Context, microserviceUUID string, withCleanup bool, removeImage bool) error

RemoveContainerByMicroserviceUUID removes a container by microservice UUID. withCleanup controls Docker named-volume removal (passed to engine.RemoveContainer). removeImage controls whether the container image is also removed after container deletion — set true for normal lifecycle deletions, false for the deprovision path.

func (*ContainerManager) RemoveContainerRuntimeForEngineSwitch

func (cm *ContainerManager) RemoveContainerRuntimeForEngineSwitch(ctx context.Context, containerID string) error

RemoveContainerRuntimeForEngineSwitch removes a workload container without deleting deploy spec rows.

func (*ContainerManager) StartContainerByMicroserviceUUID

func (cm *ContainerManager) StartContainerByMicroserviceUUID(ctx context.Context, microserviceUUID string) error

StartContainerByMicroserviceUUID starts a container by microservice UUID.

func (*ContainerManager) StopContainerByMicroserviceUUID

func (cm *ContainerManager) StopContainerByMicroserviceUUID(ctx context.Context, microserviceUUID string) error

StopContainerByMicroserviceUUID stops a container by microservice UUID

func (*ContainerManager) UpdateContainer

func (cm *ContainerManager) UpdateContainer(ctx context.Context, ms *models.Microservice, withCleanup bool) error

UpdateContainer updates a container for a microservice

type ContainerTask

type ContainerTask struct {
	Action           TaskAction
	MicroserviceUUID string
	OperationID      string // correlation id for structured logging (set on first execute)
	Retries          int
	Command          []string
	ExecID           string
}

ContainerTask represents a task to be executed on a container

func NewContainerTask

func NewContainerTask(action TaskAction, microserviceUUID string) *ContainerTask

NewContainerTask creates a new ContainerTask

func NewContainerTaskWithExec

func NewContainerTaskWithExec(action TaskAction, microserviceUUID string, command []string) *ContainerTask

NewContainerTaskWithExec creates a new ContainerTask for exec operations

func (*ContainerTask) IncrementRetries

func (t *ContainerTask) IncrementRetries()

IncrementRetries increments the retry count

type ExecOwner

type ExecOwner string

ExecOwner identifies who owns an interactive exec session.

const (
	ExecOwnerController ExecOwner = "controller"
	ExecOwnerLocal      ExecOwner = "local"
)

type ExecSessionCallbackInterface

type ExecSessionCallbackInterface interface {
	GetStdinReader() io.Reader
	GetStdoutWriter() io.Writer
	GetStderrWriter() io.Writer
	OnComplete()
	OnError(err error)
	IsRunning() bool
}

ExecSessionCallbackInterface defines the interface for exec session callbacks

type ExecSessionRecord

type ExecSessionRecord struct {
	SessionID     string
	MSUUID        string
	ContainerID   string
	RuntimeExecID string
	Owner         ExecOwner
	Started       bool
}

ExecSessionRecord tracks one interactive exec session in the ProcessManager registry.

type ExecSessionRegistry

type ExecSessionRegistry struct {
	// contains filtered or unexported fields
}

ExecSessionRegistry tracks interactive exec sessions keyed by wire sessionId.

func NewExecSessionRegistry

func NewExecSessionRegistry() *ExecSessionRegistry

NewExecSessionRegistry returns an empty exec session registry.

func (*ExecSessionRegistry) Get

func (r *ExecSessionRegistry) Get(sessionID string) (*ExecSessionRecord, bool)

Get returns a copy of the session record.

func (*ExecSessionRegistry) ListControllerSessionsForMS

func (r *ExecSessionRegistry) ListControllerSessionsForMS(msUUID string) []ExecSessionRecord

ListControllerSessionsForMS returns controller-owned sessions for one microservice.

func (*ExecSessionRegistry) ListInteractiveForMS

func (r *ExecSessionRegistry) ListInteractiveForMS(msUUID string) []ExecSessionRecord

ListInteractiveForMS returns all controller and local interactive sessions for one microservice.

func (*ExecSessionRegistry) MarkStarted

func (r *ExecSessionRegistry) MarkStarted(sessionID string)

MarkStarted marks a session as successfully started.

func (*ExecSessionRegistry) Register

func (r *ExecSessionRegistry) Register(rec *ExecSessionRecord) error

Register inserts a pending session record. sessionId must be unique.

func (*ExecSessionRegistry) Release

func (r *ExecSessionRegistry) Release(sessionID string, owner ExecOwner) (*ExecSessionRecord, error)

Release removes a session when owner matches.

func (*ExecSessionRegistry) Remove

func (r *ExecSessionRegistry) Remove(sessionID string)

Remove deletes a session regardless of owner (internal cleanup).

func (*ExecSessionRegistry) RuntimeExecIDsForContainer

func (r *ExecSessionRegistry) RuntimeExecIDsForContainer(containerID string) map[string]struct{}

RuntimeExecIDsForContainer returns registered runtime exec ids for a container (for orphan sweep).

func (*ExecSessionRegistry) SetRuntimeExecID

func (r *ExecSessionRegistry) SetRuntimeExecID(sessionID, engineExecID string)

SetRuntimeExecID updates the engine-native exec handle after CreateExecSession. Edgelet engines use the pre-create hint; docker/podman replace it with the daemon-assigned id.

type LocalDeployProgressCallback

type LocalDeployProgressCallback func(stage string, message string)

LocalDeployProgressCallback reports local deployment runtime stage transitions.

type MicroserviceManagerInterface

type MicroserviceManagerInterface interface {
	GetLatestMicroservices() []*models.Microservice
	GetCurrentMicroservices() []*models.Microservice
	FindLatestMicroserviceByUUID(uuid string) *models.Microservice
	GetRegistry(id int) *models.Registry
	SetCurrentMicroservices(microservices []*models.Microservice)
}

MicroserviceManagerInterface defines the interface for microservice management This will be implemented by FieldAgent or a dedicated MicroserviceManager

type ProcessManager

type ProcessManager struct {
	// contains filtered or unexported fields
}

ProcessManager manages container lifecycle via a ContainerEngine.

func GetInstance

func GetInstance() *ProcessManager

GetInstance returns the singleton ProcessManager instance

func (*ProcessManager) CleanupForEngineSwitch

func (pm *ProcessManager) CleanupForEngineSwitch(ctx context.Context) error

CleanupForEngineSwitch stops/removes all managed workload containers and clears ephemeral DB state.

func (*ProcessManager) CreateControllerExecSession

func (pm *ProcessManager) CreateControllerExecSession(sessionID, msUUID string, command []string, callback ExecSessionCallbackInterface) error

CreateControllerExecSession registers a controller exec session, starts the shell, and blocks until running or timeout.

func (*ProcessManager) CreateExecSession

func (pm *ProcessManager) CreateExecSession(microserviceUUID string, command []string, callback ExecSessionCallbackInterface) (string, error)

CreateExecSession creates and starts an exec session for a microservice. Legacy field-agent path — returns the runtime exec id (not wire sessionId). Prefer CreateControllerExecSession / CreateLocalExecSession for Plan 23 multi-session exec.

func (*ProcessManager) CreateLocalExecSession

func (pm *ProcessManager) CreateLocalExecSession(localSessionID, msUUID string, command []string, callback ExecSessionCallbackInterface) error

CreateLocalExecSession registers a local EdgeletAPI exec session with the local runtime id pattern. Interactive shells wait for the process to be running before POST returns; one-shot commands (ms exec <id> -- cmd) start I/O asynchronously local exec path.

func (*ProcessManager) DeleteControlPlane

func (pm *ProcessManager) DeleteControlPlane() error

DeleteControlPlane stops the controller container, removes volumes, and deletes the singleton row.

func (*ProcessManager) DrainRuntimeForShutdown

func (pm *ProcessManager) DrainRuntimeForShutdown(timeout time.Duration) error

DrainRuntimeForShutdown best-effort drains runtime tasks before manager teardown. It is used during daemon shutdown so containerd can stop without lingering shims.

func (*ProcessManager) GetContainerByID

func (pm *ProcessManager) GetContainerByID(containerID string) (*engine.Container, error)

GetContainerByID resolves one container by concrete container id.

func (*ProcessManager) GetContainerByIDPrefix

func (pm *ProcessManager) GetContainerByIDPrefix(prefix string) (*engine.Container, []string, error)

GetContainerByIDPrefix resolves a container by ID prefix. Returns the matched container and a list of matching IDs for ambiguity reporting.

func (*ProcessManager) GetContainerForMicroservice

func (pm *ProcessManager) GetContainerForMicroservice(microserviceUUID string) (*engine.Container, error)

GetContainerForMicroservice resolves runtime container by microservice UUID.

func (*ProcessManager) GetExecSessionExitCode

func (pm *ProcessManager) GetExecSessionExitCode(execID string) (int, error)

GetExecSessionExitCode returns the exit status for completed exec sessions.

func (*ProcessManager) GetExecSessionStatus

func (pm *ProcessManager) GetExecSessionStatus(execID string) (any, error)

GetExecSessionStatus reports whether the exec process identified by execID is running.

func (*ProcessManager) GetLatestMicroservices

func (pm *ProcessManager) GetLatestMicroservices() []*models.Microservice

GetLatestMicroservices returns the latest microservices from the microservice manager

func (*ProcessManager) GetMicroserviceUUIDForContainer

func (pm *ProcessManager) GetMicroserviceUUIDForContainer(container engine.Container) string

GetMicroserviceUUIDForContainer derives a microservice selector from a container.

func (*ProcessManager) GetModuleIndex

func (pm *ProcessManager) GetModuleIndex() int

GetModuleIndex returns the module index

func (*ProcessManager) GetName

func (pm *ProcessManager) GetName() string

GetName returns the module name

func (*ProcessManager) GetSession

func (pm *ProcessManager) GetSession(sessionID string) (*ExecSessionRecord, bool)

GetSession returns the registry record for attach/status lookups.

func (*ProcessManager) InspectContainerRaw

func (pm *ProcessManager) InspectContainerRaw(containerID string) (map[string]any, error)

InspectContainerRaw returns full engine-native inspect payload for a container.

func (*ProcessManager) KillMicroservice

func (pm *ProcessManager) KillMicroservice(microserviceUUID string) error

KillMicroservice sends a forceful kill signal to a runtime microservice container.

func (*ProcessManager) LaunchLocalMicroservice

func (pm *ProcessManager) LaunchLocalMicroservice(ms *models.Microservice, registry *models.Registry, hostIP string) (string, error)

LaunchLocalMicroservice creates and starts a locally deployed microservice.

func (*ProcessManager) LaunchLocalMicroserviceWithProgress

func (pm *ProcessManager) LaunchLocalMicroserviceWithProgress(ms *models.Microservice, registry *models.Registry, hostIP string, progress LocalDeployProgressCallback) (string, error)

LaunchLocalMicroserviceWithProgress creates and starts a locally deployed microservice while reporting stage transitions.

func (*ProcessManager) ListControllerSessionsForMS

func (pm *ProcessManager) ListControllerSessionsForMS(msUUID string) []ExecSessionRecord

ListControllerSessionsForMS lists controller-owned sessions for status reporting (Plan 23-3).

func (*ProcessManager) ListImages

func (pm *ProcessManager) ListImages() ([]engine.ImageInfo, error)

ListImages returns local runtime images from the active engine.

func (*ProcessManager) LoadImageFromPath

func (pm *ProcessManager) LoadImageFromPath(path string) ([]engine.LoadedImage, error)

LoadImageFromPath imports an image archive from daemon-local path.

func (*ProcessManager) PruneContainers

func (pm *ProcessManager) PruneContainers() (*engine.ContainerPruneReport, error)

PruneContainers prunes stopped/orphaned containers.

func (*ProcessManager) PruneDanglingImages

func (pm *ProcessManager) PruneDanglingImages() (*engine.ImagePruneReport, error)

PruneDanglingImages prunes dangling images.

func (*ProcessManager) PruneVolumes

func (pm *ProcessManager) PruneVolumes() (*engine.VolumePruneReport, error)

PruneVolumes prunes unused/orphaned volume artifacts.

func (*ProcessManager) PullImage

func (pm *ProcessManager) PullImage(imageRef string, registry *models.Registry, platform string) error

PullImage pulls an image using optional registry credentials and platform selector.

func (*ProcessManager) PullImageWithProgress

func (pm *ProcessManager) PullImageWithProgress(imageRef string, registry *models.Registry, platform string, onProgress func(float32)) error

PullImageWithProgress pulls an image and reports progress percent when available.

func (*ProcessManager) ReleaseExecSession

func (pm *ProcessManager) ReleaseExecSession(sessionID string, owner ExecOwner) error

ReleaseExecSession stops the runtime exec and removes the registry entry when owner matches.

func (*ProcessManager) RemoveContainerByContainerID

func (pm *ProcessManager) RemoveContainerByContainerID(containerID string) error

RemoveContainerByContainerID removes a runtime container by concrete container id.

func (*ProcessManager) RemoveImage

func (pm *ProcessManager) RemoveImage(selector string) error

RemoveImage removes an image by ID or name reference.

func (*ProcessManager) RemoveMicroservice

func (pm *ProcessManager) RemoveMicroservice(microserviceUUID string) error

RemoveMicroservice removes a runtime microservice container.

func (*ProcessManager) ResizeExecSession

func (pm *ProcessManager) ResizeExecSession(execID string, cols, rows uint32) error

ResizeExecSession resizes a running tty exec session.

func (*ProcessManager) RestartControlPlaneDeployment

func (pm *ProcessManager) RestartControlPlaneDeployment(item *models.ControlPlaneDeployment, pullImage bool) error

RestartControlPlaneDeployment bounces the singleton control plane container without deleting the system_control_plane row or re-registering with Pot.

func (*ProcessManager) RestartMicroservice

func (pm *ProcessManager) RestartMicroservice(microserviceUUID string) error

RestartMicroservice performs stop then start for a runtime microservice container.

func (*ProcessManager) SetControlPlanePullOnRecreate

func (pm *ProcessManager) SetControlPlanePullOnRecreate(pull bool)

SetControlPlanePullOnRecreate requests an image pull on the next control plane generation recreate.

func (*ProcessManager) SetEngine

func (pm *ProcessManager) SetEngine(eng engine.ContainerEngine, engineName string)

SetEngine swaps the active container engine without restarting the process manager.

func (*ProcessManager) Start

func (pm *ProcessManager) Start(eng engine.ContainerEngine, microserviceManager MicroserviceManagerInterface) error

Start starts the ProcessManager with a given container engine.

func (*ProcessManager) StartMicroservice

func (pm *ProcessManager) StartMicroservice(microserviceUUID string) error

StartMicroservice starts a runtime microservice container.

func (*ProcessManager) Stop

func (pm *ProcessManager) Stop() error

Stop stops the ProcessManager

func (*ProcessManager) StopAllInteractiveForMicroservice

func (pm *ProcessManager) StopAllInteractiveForMicroservice(msUUID string)

StopAllInteractiveForMicroservice stops all controller and local interactive exec sessions for one MS. Healthcheck exec paths are excluded — they never enter the registry.

func (*ProcessManager) StopExecSession

func (pm *ProcessManager) StopExecSession(_ string, execID string) error

StopExecSession kills and deregisters the exec process in the engine. Called when the controller closes the WebSocket so the exec ID can be reused.

func (*ProcessManager) StopMicroservice

func (pm *ProcessManager) StopMicroservice(microserviceUUID string) error

StopMicroservice stops a runtime microservice container.

func (*ProcessManager) StopRunningMicroservices

func (pm *ProcessManager) StopRunningMicroservices(iofogUUID string, withCleanup bool) error

StopRunningMicroservices stops all running microservices matching the iofogUuid. When withCleanup=true (deprovision flow), containers are also removed along with their volumes.

func (*ProcessManager) StopRunningMicroservicesWithScope

func (pm *ProcessManager) StopRunningMicroservicesWithScope(iofogUUID string, withCleanup bool, includeLocal bool) error

StopRunningMicroservicesWithScope stops running microservices matching iofogUuid. includeLocal=false preserves local-scope workloads during deprovision cleanup.

func (*ProcessManager) StreamMicroserviceLogs

func (pm *ProcessManager) StreamMicroserviceLogs(microserviceUUID string, cfg *engine.TailConfig, handler engine.LogTailHandler) error

StreamMicroserviceLogs streams logs for one runtime microservice using the provided tail handler.

func (*ProcessManager) SyncApplyControlPlaneDeployment

func (pm *ProcessManager) SyncApplyControlPlaneDeployment(item *models.ControlPlaneDeployment, progress LocalDeployProgressCallback) error

SyncApplyControlPlaneDeployment persists and synchronously launches or recreates the controller container.

func (*ProcessManager) TailMicroserviceLogs

func (pm *ProcessManager) TailMicroserviceLogs(microserviceUUID string, cfg *engine.TailConfig) ([]map[string]any, error)

TailMicroserviceLogs returns bounded logs for one runtime microservice.

func (*ProcessManager) Update

func (pm *ProcessManager) Update()

Update notifies the ProcessManager of changes updates registries and notifies monitor thread

type RecreateOptions

type RecreateOptions struct {
	PullImage   bool
	WithCleanup bool
	RemoveImage bool
}

RecreateOptions controls remove+create lifecycle recreation.

type RestartStuckChecker

type RestartStuckChecker struct {
	// contains filtered or unexported fields
}

RestartStuckChecker tracks restart timestamps to detect stuck microservices

func GetRestartStuckChecker

func GetRestartStuckChecker() *RestartStuckChecker

GetRestartStuckChecker returns the singleton RestartStuckChecker instance

func (*RestartStuckChecker) Clear

func (r *RestartStuckChecker) Clear(microserviceUUID string)

Clear removes all tracking data for a microservice (useful for cleanup)

func (*RestartStuckChecker) IsStuck

func (r *RestartStuckChecker) IsStuck(microserviceUUID string) bool

IsStuck checks if a microservice is stuck in restart loop Returns true if the microservice has restarted 10+ times in the last 10 minutes

func (*RestartStuckChecker) IsStuckInContainerCreation

func (r *RestartStuckChecker) IsStuckInContainerCreation(microserviceUUID string) bool

IsStuckInContainerCreation checks if a microservice is stuck in container creation Returns true if the microservice has attempted container creation 10+ times in the last 10 minutes

type TaskAction

type TaskAction string

TaskAction represents the type of container task

const (
	TaskActionAdd               TaskAction = "ADD"
	TaskActionUpdate            TaskAction = "UPDATE"
	TaskActionRemove            TaskAction = "REMOVE"
	TaskActionRemoveWithCleanup TaskAction = "REMOVE_WITH_CLEAN_UP"
	TaskActionStop              TaskAction = "STOP"
	TaskActionCreateExec        TaskAction = "CREATE_EXEC"
	TaskActionGetExecStatus     TaskAction = "GET_EXEC_STATUS"
	TaskActionKillExec          TaskAction = "KILL_EXEC"
)

type TaskQueue

type TaskQueue struct {
	// contains filtered or unexported fields
}

TaskQueue manages container tasks in a thread-safe queue

func NewTaskQueue

func NewTaskQueue(bufferSize int) *TaskQueue

NewTaskQueue creates a new TaskQueue with the specified buffer size

func (*TaskQueue) Add

func (q *TaskQueue) Add(task *ContainerTask)

Add adds a task to the queue. Silently drops the task if the queue is full (capacity = 100); this should never happen under normal operating conditions.

func (*TaskQueue) Close

func (q *TaskQueue) Close()

Close closes the task queue channel.

func (*TaskQueue) Get

func (q *TaskQueue) Get(ctx context.Context) (*ContainerTask, bool)

Get blocks until a task is available or the context is canceled. Returns (task, true) on success and (nil, false) when the context is done.

func (*TaskQueue) Size

func (q *TaskQueue) Size() int

Size returns the current number of tasks in the queue.

func (*TaskQueue) TryGet

func (q *TaskQueue) TryGet() (*ContainerTask, bool)

TryGet attempts to retrieve a task from the queue without blocking.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL