Documentation ¶
Overview ¶
Package daemonutil provides utilities for controlling background processes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadyFunc ¶
ReadyFunc checks the data written to ReadyWriter and returns if the service is ready or having error. ReadyWriter expects:
(false, nil) if the service is not ready yet; (false, err) if the service has an error; (true, nil) if the service is ready.
type ReadyWriter ¶
type ReadyWriter struct {
// contains filtered or unexported fields
}
ReadyWriter stores the data written to it and identifies if a service is ready or already failed.
func NewReadyWriter ¶
func NewReadyWriter(f ReadyFunc) *ReadyWriter
NewReadyWriter creates a ReadyWriter object with f to detect the state of the service.
func (*ReadyWriter) Close ¶
func (w *ReadyWriter) Close() error
Close closes the writer and emits error if it has not yet detected ready/error event. It implements io.Closer interface.
Click to show internal directories.
Click to hide internal directories.