server

package
v0.0.0-...-1b17b00 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewPeckerServer)

Functions

func GetCPULoad

func GetCPULoad() (info *load.AvgStat)

GetCPULoad retrieves the CPU load information.

No parameters. Returns *load.AvgStat.

func GetDiskInfo

func GetDiskInfo() (diskInfoList []repo.DiskInfo)

GetDiskInfo retrieves disk information and returns a list of repo.DiskInfo.

No parameters. Returns a slice of repo.DiskInfo.

func GetHostName

func GetHostName() string

GetHostName returns the hostname of the host machine.

No parameters. Returns a string.

func GetMemInfo

func GetMemInfo() (memInfoList []repo.MemInfo)

GetMemInfo retrieves memory information and returns a list of MemInfo.

No parameters. Returns a list of MemInfo.

func GetNetworkInfo

func GetNetworkInfo() (networkList []repo.Network)

GetNetworkInfo retrieves network information.

No parameters. Returns a slice of repo.Network.

func GetNodeState

func GetNodeState() (nodeStatus *repo.NodeState)

GetNodeState returns the node status including progress, disk information, memory information, and network information.

Returns a pointer to repo.NodeState.

func GetProgressInfo

func GetProgressInfo() (progressInfo repo.ProgressInfo)

GetProgressInfo retrieves progress information.

No parameters. Returns a repo.ProgressInfo struct.

func GetRuntimeInfo

func GetRuntimeInfo() (runTimeInfo repo.RunTimeInfo)

GetRuntimeInfo retrieves the runtime information.

Returns a RunTimeInfo struct.

Types

type PeckerServer

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

func NewPeckerServer

func NewPeckerServer(
	conf *conf.ServerConf,
	peckService *service.PeckService,
	registrar registry.Registrar,
	nodeRepository repo.NodeRepository,
) *PeckerServer

NewPeckerServer create pecker server

func (*PeckerServer) Init

func (s *PeckerServer) Init() error

func (*PeckerServer) ReportNodeTask

func (s *PeckerServer) ReportNodeTask()

ReportNodeTask generates a function comment for the given function body in a markdown code block with the correct language syntax.

No parameters. No return value.

func (*PeckerServer) Run

func (s *PeckerServer) Run(ctx context.Context, cleanUp func()) error

func (*PeckerServer) Stop

func (s *PeckerServer) Stop() error

Jump to

Keyboard shortcuts

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