Documentation ¶
Index ¶
- func RestartService(unit string) error
- func TryRestartService(unit string) error
- func WatchDBusSignal(ctx context.Context, iface, objPath string, handlerFunc func(s *dbus.Signal))
- func WatchFileChange(ctx context.Context, handler FSNotifyHandler, monitorTargets []string)
- type FSNotifyHandler
- type FSNotifyHandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RestartService ¶
RestartService restarts a service. If the service isn't already running it will be started.
func TryRestartService ¶
TryRestartService will restart a service, but only if it's currently running. A service that isn't running won't be affected.
func WatchDBusSignal ¶
func WatchFileChange ¶
func WatchFileChange(ctx context.Context, handler FSNotifyHandler, monitorTargets []string)
Types ¶
type FSNotifyHandler ¶
func AnyOf ¶
func AnyOf(nextHandler FSNotifyHandler, op fsnotify.Op, ops ...fsnotify.Op) FSNotifyHandler
AnyOf propagates the fsnotify Event to the next FSNotifyHandler only if the event type is one of the specified fsnotify Ops.
type FSNotifyHandlerFunc ¶
FSNotifyHandlerFunc is a callback for fsnotify Events.
func (FSNotifyHandlerFunc) Notify ¶
func (f FSNotifyHandlerFunc) Notify(event fsnotify.Event)
Click to show internal directories.
Click to hide internal directories.