monitor

package
v0.0.0-...-99badd1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, syncthingConfig SyncthingConfig) *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

type SyncthingConfig

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

SyncthingConfig represents the syncthing configuration

func NewSyncthingConfig

func NewSyncthingConfig(config, secret, data string) SyncthingConfig

NewSyncthingConfig returns a new syncthing config

Jump to

Keyboard shortcuts

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