admin

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminServer

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

AdminServer represents the HTTP admin interface

func NewAdminServer

func NewAdminServer(cfg *config.Config, sup SupervisorInterface) *AdminServer

NewAdminServer creates a new admin server

func (*AdminServer) BroadcastLog

func (a *AdminServer) BroadcastLog(service, message string)

BroadcastLog broadcasts a log message to all connected clients

func (*AdminServer) Start

func (a *AdminServer) Start() error

Start starts the admin server

func (*AdminServer) Stop

func (a *AdminServer) Stop() error

Stop stops the admin server

type ClientInfo

type ClientInfo struct {
	Channel chan []byte
	Filter  string
}

ClientInfo represents information about a connected client

type SupervisorInterface

type SupervisorInterface interface {
	GetServiceStatus(name string) (*supervisor.ServiceInfo, error)
	GetAllServiceStatuses() map[string]*supervisor.ServiceInfo
	StartService(name string) error
	StopService(name string) error
	RestartService(name string) error
	EnableCronJob(name string) error
	DisableCronJob(name string) error
}

SupervisorInterface defines the methods required by the AdminServer

Jump to

Keyboard shortcuts

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