statusfile

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListStatusFiles

func ListStatusFiles() ([]string, error)

Types

type FileStatusStore

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

func NewFileStatusStore

func NewFileStatusStore(listenAddr string, logger *slog.Logger) (*FileStatusStore, error)

func (*FileStatusStore) GetFilePath

func (s *FileStatusStore) GetFilePath() string

func (*FileStatusStore) RemoveFile

func (s *FileStatusStore) RemoveFile()

func (*FileStatusStore) UpdateServers

func (s *FileStatusStore) UpdateServers(servers []ServerStatus)

type ServerStatus

type ServerStatus struct {
	Name         string    `json:"name"`
	Status       string    `json:"status"`
	RequestCount int64     `json:"request_count"`
	ErrorCount   int64     `json:"error_count"`
	RestartCount int       `json:"restart_count"`
	Uptime       string    `json:"uptime"`
	ToolCount    int       `json:"tool_count"`
	LastActivity time.Time `json:"last_activity"`
}

type StatusInfo

type StatusInfo struct {
	PID        int            `json:"pid"`
	StartedAt  time.Time      `json:"started_at"`
	ListenAddr string         `json:"listen_addr"`
	Servers    []ServerStatus `json:"servers"`
}

func ReadCurrentStatus

func ReadCurrentStatus() (*StatusInfo, error)

Jump to

Keyboard shortcuts

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