slapos

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SlapOSMetricCollector

type SlapOSMetricCollector struct {
	InstanceRoot                 string   `toml:"instance_root"`
	SocketName                   string   `toml:"socket_name"`
	RecursiveInstanceGlobPattern string   `toml:"recursive_instance_glob_pattern"`
	IgnoredProcessNames          []string `toml:"ignored_process_names"`
	Debug                        bool     `toml:"debug"`

	Log telegraf.Logger `toml:"-"`
	// contains filtered or unexported fields
}

Collect process metrics from running slapos node.

func (*SlapOSMetricCollector) Description

func (s *SlapOSMetricCollector) Description() string

func (*SlapOSMetricCollector) Gather

func (*SlapOSMetricCollector) Init

func (s *SlapOSMetricCollector) Init() error

func (*SlapOSMetricCollector) SampleConfig

func (s *SlapOSMetricCollector) SampleConfig() string

func (*SlapOSMetricCollector) Stop

func (s *SlapOSMetricCollector) Stop()

type SupervisorProcessInfo

type SupervisorProcessInfo struct {
	Name          string                 `xmlrpc:"name"`
	Group         string                 `xmlrpc:"group"`
	Start         int                    `xmlrpc:"start"`
	Stop          int                    `xmlrpc:"stop"`
	Now           int                    `xmlrpc:"now"`
	State         SupervisorProcessState `xmlrpc:"state"`
	Statename     string                 `xmlrpc:"statename"`
	SpawnErr      string                 `xmlrpc:"spawnerr"`
	ExitStatus    int                    `xmlrpc:"exitstatus"`
	LogFile       string                 `xmlrpc:"logfile"`
	StdoutLogFile string                 `xmlrpc:"stdout_logfile"`
	StderrLogFile string                 `xmlrpc:"stderr_logfile"`
	Pid           int32                  `xmlrpc:"pid"`
	Description   string                 `xmlrpc:"description"`
}

Process Info returned by getAllProcessInfo XMLRPC call

type SupervisorProcessState

type SupervisorProcessState = int64

possible states for a process in supervisor XMLRPC-API

const (
	STOPPED  SupervisorProcessState = 0
	STARTING SupervisorProcessState = 10
	RUNNING  SupervisorProcessState = 20
	BACKOFF  SupervisorProcessState = 30
	STOPPING SupervisorProcessState = 40
	EXITED   SupervisorProcessState = 100
	FATAL    SupervisorProcessState = 200
	UNKNOWN  SupervisorProcessState = 1000
)

type UnixSocketRoundTripper

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

func NewUnixRoundTripper

func NewUnixRoundTripper(socketPath string) *UnixSocketRoundTripper

Implement http.RoundTripper protocol for an unix socket

func (UnixSocketRoundTripper) RoundTrip

func (r UnixSocketRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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