daemonv2

package
v0.0.0-...-8680cc4 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DaemonLog     = "/tmp/pouchd.log"
	PouchdBin     = "pouchd"
	HomeDir       = "/tmp/test/pouch"
	Listen        = "unix:///tmp/test/pouch/pouchd.sock"
	ContainerdAdd = "/tmp/test/pouch/containerd.sock"
	Pidfile       = "/tmp/test/pouch/pouch.pid"
	ConfigJSON    = "/tmp/pouchconfig.json"
)

For pouch daemon test, we launched another pouch daemon.

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

type Daemon struct {
	daemon.Config

	// pouchd binary location
	Bin string

	// config file
	ConfigJSON string

	// pid of pouchd
	Pid int

	LogPath string
	LogFile *os.File
	// contains filtered or unexported fields
}

Daemon defines the daemon to test

func New

func New() *Daemon

New returns the daemon struct.

func (*Daemon) Clean

func (d *Daemon) Clean()

Clean kills pouch daemon and clean config file

func (*Daemon) DumpLog

func (d *Daemon) DumpLog()

DumpLog prints the daemon log

func (*Daemon) IsUp

func (d *Daemon) IsUp() bool

IsUp checks the up or not

func (*Daemon) Restart

func (d *Daemon) Restart() error

Restart restarts pouch daemon

func (*Daemon) RunCommand

func (d *Daemon) RunCommand(args ...string) *icmd.Result

RunCommand runs pouch command with specified listen

func (*Daemon) Start

func (d *Daemon) Start() error

Start starts pouch daemon with config file, instead of running with arguments

func (*Daemon) Stop

func (d *Daemon) Stop() error

Stop stops pouch daemon

Jump to

Keyboard shortcuts

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