reboot

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package reboot provides a function to reboot the system.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRoot = errors.New("must be run as sudo/root")

Functions

func Reboot

func Reboot(ctx context.Context, opts ...OpOption) error

Reboots the system.

Types

type Op

type Op struct {
	// contains filtered or unexported fields
}

type OpOption

type OpOption func(*Op)

func WithSystemctl

func WithSystemctl(b bool) OpOption

Set true to run "systemctl reboot".

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL