v1.0.0
Immutable
release. Only release title and notes can be modified.
Changes
go-runit v1.0.0 - Native runit Control
Initial Stable Release
This is the first stable release of go-runit, a native Go library for controlling runit services without shelling out to sv.
Highlights
- Zero process spawning - Communicates directly with supervise endpoints
- High performance - Status decode in ~48ns with minimal allocations
- Real-time monitoring - fsnotify-based watching without polling
- Full compatibility - Implements complete
runit/daemontoolsprotocol - Production ready - Comprehensive testing with real
runitservices
Installation
go get github.com/axondata/go-runit@v1.0.0Quick Start
client, err := runit.New("/etc/service/myapp")
if err != nil {
log.Fatal(err)
}
// Start service
err = client.Up(context.Background())
// Get status
status, err := client.Status(context.Background())
fmt.Printf("State: %v, PID: %d\n", status.State, status.PID)Performance
BenchmarkStatusDecode-12 21870621 47.61 ns/op 24 B/op 1 allocs/op
BenchmarkStatusDecodeParallel-12 82882237 14.29 ns/op 24 B/op 1 allocs/op
BenchmarkStateString-12 1000000000 0.71 ns/op 0 B/op 0 allocs/op
Documentation
Requirements
- Go 1.21 or later
- Linux or macOS
runitordaemontools-compatible supervisor
License
Apache 2.0
Acknowledgments
Thanks to the Daniel J. Bernstein, the author of daemontools and Gerrit Pape (the original author of runit) for their well-documented binary protocol specification.