Skip to content

Simple worker implementation for Helium based on service.Service

Notifications You must be signed in to change notification settings

go-helium/simple-worker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
    )
}

About

Simple worker implementation for Helium based on service.Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages