package taskinit
import "github.com/moby/swarmkit/v2/manager/orchestrator/taskinit"
Index ¶
- func CheckTasks(ctx context.Context, s *store.MemoryStore, readTx store.ReadTx, initHandler InitHandler, startSupervisor restart.SupervisorInterface) error
- type InitHandler
Functions ¶
func CheckTasks ¶
func CheckTasks(ctx context.Context, s *store.MemoryStore, readTx store.ReadTx, initHandler InitHandler, startSupervisor restart.SupervisorInterface) error
CheckTasks fixes tasks in the store before orchestrator runs. The previous leader might not have finished processing their updates and left them in an inconsistent state.
Types ¶
type InitHandler ¶
type InitHandler interface { IsRelatedService(service *api.Service) bool FixTask(ctx context.Context, batch *store.Batch, t *api.Task) SlotTuple(t *api.Task) orchestrator.SlotTuple }
InitHandler defines orchestrator's action to fix tasks at start.
Source Files ¶
- Version
- v2.0.0-20250103191802-8c1959736554 (latest)
- Published
- Jan 3, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 week ago –
Tools for package owners.