Creates a simple worker function utilizing go routines and channels
go get github.com/neomrc/go-worker
import "github.com/neomrc/go-worker/src/worker"
// creates the handler
handler := worker.NewHandler(func() {
fmt.Println("Hello, world!")
})
// set the interval for polling
handler.SetInterval(1000)
// initializes the worker instance
worker := worker.NewWorker()
// append the worker handler
worker.AddHandler("handler", handler)
// start the worker
worker.Start()
go mod download
go run example/main.go