package
1.3.0
Repository: https://github.com/asticode/go-astitools.git
Documentation: pkg.go.dev

# README

Worker

// Init worker
var w = astiworker.NewWorker()

// Handle signals
w.HandleSignals()

// Serve
w.Serve("127.0.0.1:4000", myHandler)

// Execute
h, _ := w.Exec("sleep", "10")
go func() {
	time.Sleep(3 * time.Second)
	h.Stop()
}

// Wait
w.Wait()

# Functions

NewWorker builds a new worker.
TermSignalHandler returns a SignalHandler that is executed only on a term signal.

# Constants

Statuses.
Statuses.
Statuses.

# Structs

ConfigurationConsumer represents a consumer configuration.
DialOptions represents dial options.
No description provided by the author
Task represents a task.
Worker represents an object capable of blocking, handling signals and stopping.

# Interfaces

ExecHandler represents an object capable of handling the execution of a cmd.

# Type aliases

SignalHandler represents a func that can handle a signal.
TaskFunc represents a function that can create a new task.