Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 398 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 398 Bytes

Helium simple worker implementation

Example

package main

import (
    "context"
    "time"

    worker "github.com/go-helium/simple-worker""time"
)

func runner(context.Context) {
    // Do something
}

func main() {
    worker.WrapJob("test", runner,
        worker.WithImmediately(), // run at start
        worker.WithTimer(time.Second * 10), // repeat every 10 seconds
    )
}