Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 8.2% on proxy.golang.org

proxy.golang.org : github.com/changkun/sched

Package sched provides a consistently reliable task scheduler with future support. sched is a consistently reliable embedded task scheduler library for Go. It applies to be a microkernel of an internal application service, and pluggable tasks must implements sched Task interface. sched not only schedules a task at a specific time or reschedules a planned task immediately, but also flexible to support periodically tasks, which differ from traditional non-consistently unreliable cron task scheduling. Furthermore, sched manage tasks, like goroutine runtime scheduler, uses greedy scheduling schedules all tasks and a distributed lock mechanism that ensures tasks can only be executed once across multiple replica instances. Callers must initialize sched database when using sched. sched schedules different tasks in a priority queue and schedules task with minimum goroutines when tasks with same execution time arrival: A Task that can be scheduled by sched must implements the following task interface: Note that your task must be a serilizable struct by `json.Marshal()`, otherwise it cannot be persist by goshceudler (e.g. `type Func func()` cannot be scheduled) A Task can have a future of its final execution result. `sched.Submit` and `sched.Trigger` both returns future object of `Execute()`'s `result interface{}`. To get the future:

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/changkun/sched
Keywords: go, golang, high-performance, persistence, scheduler
License: MIT
Latest release: over 4 years ago
First release: over 4 years ago
Namespace: github.com/changkun
Stars: 47 on GitHub
Forks: 4 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 23 days ago

    Loading...
    Readme
    Loading...