Files
go-alived/internal/cmd/root.go
loveuer 3fc3c860bc
Some checks failed
Release / Build darwin-amd64 (push) Has been cancelled
Release / Build linux-amd64 (push) Has been cancelled
Release / Build darwin-arm64 (push) Has been cancelled
Release / Build linux-arm64 (push) Has been cancelled
Release / Create Release (push) Has been cancelled
feat: add notify scripts for state transitions
- Add notify_master/notify_backup/notify_fault support
- Support both file path and inline shell script
- Async execution with 60s timeout
- Inject GO_ALIVED_INSTANCE and GO_ALIVED_EVENT env vars
- Bump version to 1.3.0

🤖 Generated with [Qoder][https://qoder.com]
2026-03-05 06:02:01 -08:00

28 lines
568 B
Go

package cmd
import (
"os"
"github.com/spf13/cobra"
)
// Version can be set at build time via ldflags
var Version = "1.3.0"
var rootCmd = &cobra.Command{
Use: "go-alived",
Short: "Go-Alived - VRRP High Availability Service",
Long: `go-alived is a lightweight, dependency-free VRRP implementation in Go.
It provides high availability for IP addresses with health checking support.`,
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}
func init() {
rootCmd.Version = Version
rootCmd.CompletionOptions.DisableDefaultCmd = true
}