Squad is package contains a shared shutdown primitive.
Simple service with signal handler and healthchecker.
package main
import (
"context"
"github.com/moeryomenko/squad"
)
func main() {
s := squad.NewSquad(squad.WithSignalHandler())
// s.Run(...) // run your code.
s.Wait()
}
Squad is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and/or LICENSE-MIT for details.