plugind

package
v0.0.0-...-b5b2af5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SVC_CHECK_FILE = checkFileIsExisted
	SVC_CHECK_PORT = checkPortIsUsed
)

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Plugins []Plugin `toml:"plugin"`
}

func NewManager

func NewManager() (*Manager, error)

func (*Manager) StartWithContext

func (c *Manager) StartWithContext(ctx context.Context, name string) error

func (*Manager) Wait

func (c *Manager) Wait()

type Plugin

type Plugin struct {
	Name    string     `toml:"name"`
	Service []*Service `toml:"service"`
}

type Service

type Service struct {
	Name    string          `toml:"name"`
	Command string          `toml:"command"`
	Stdout  string          `toml:"stdout"`
	Stderr  string          `toml:"stderr"`
	Check   []*ServiceCheck `toml:"check"`
	Timeout int             `toml:"timeout"`
	Running bool
}

type ServiceCheck

type ServiceCheck struct {
	Type  string `toml:"type"`
	Value string `toml:"value"`
}

Jump to

Keyboard shortcuts

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