Documentation ¶
Index ¶
- func Init(appName, env string, opts ...Option)
- func IsAlive() bool
- func IsReady() bool
- func Run(services ...StartStopper)
- func RunWait(services ...StartStopper) *sync.WaitGroup
- func SetAlive(state bool)
- func SetInfo(info map[string]string)
- func SetReady(state bool)
- func StartDiagnosticsServer(addr string)
- func StartDiagnosticsServerWithConfig(addr string, cfg DiagnosticServerConfig)
- func Wait(signals []os.Signal) os.Signal
- type DiagnosticServerConfig
- type HTTPServer
- type LeaderElection
- type Option
- type Service
- type StartStopper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(services ...StartStopper)
func RunWait ¶
func RunWait(services ...StartStopper) *sync.WaitGroup
func StartDiagnosticsServer ¶
func StartDiagnosticsServer(addr string)
func StartDiagnosticsServerWithConfig ¶
func StartDiagnosticsServerWithConfig(addr string, cfg DiagnosticServerConfig)
Types ¶
type DiagnosticServerConfig ¶
type DiagnosticServerConfig struct { DocsDir string ConfigClientHandler http.HandlerFunc StateHandler http.HandlerFunc }
type HTTPServer ¶
func NewHTTPServer ¶
func (*HTTPServer) Start ¶
func (s *HTTPServer) Start()
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop()
type LeaderElection ¶
type LeaderElection struct {
// contains filtered or unexported fields
}
func NewLeaderElection ¶
func NewLeaderElection(etcdHosts []string, etcdPrefix string) (*LeaderElection, error)
func (*LeaderElection) Start ¶
func (l *LeaderElection) Start()
func (*LeaderElection) Stop ¶
func (l *LeaderElection) Stop()
type StartStopper ¶
type StartStopper interface { Start() Stop() }
Click to show internal directories.
Click to hide internal directories.