monitor

package
v0.0.0-...-3476540 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//SyncthingBin path of the syncthing binary
	SyncthingBin = "/var/okteto/bin/syncthing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

Monitor makes sure the list of processes is running

func NewMonitor

func NewMonitor(ctx context.Context) *Monitor

NewMonitor returns an initialized monitor

func (*Monitor) Add

func (m *Monitor) Add(p *Process)

Add adds a process to monitor

func (*Monitor) Run

func (m *Monitor) Run() error

Run starts all the process of the monitor and checks the state of the process

func (*Monitor) Stop

func (m *Monitor) Stop()

Stop stops all the processes

type Process

type Process struct {
	Name string
	Path string
	Args []string
	// contains filtered or unexported fields
}

Process is process monitored

func NewProcess

func NewProcess(name string, path string, args []string) *Process

NewProcess returns an intialized process

Jump to

Keyboard shortcuts

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