udp_server

package
v0.0.0-...-5893fcd Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerLog

func ContainerLog(ctx *HandlerCtx)

ContainerLog container log

func ContainerPause

func ContainerPause(ctx *HandlerCtx)

ContainerPause

func ContainerRename

func ContainerRename(ctx *HandlerCtx)

ContainerRename

func ContainerRestart

func ContainerRestart(ctx *HandlerCtx)

ContainerRestart docker restart

func ContainerTop

func ContainerTop(ctx *HandlerCtx)

ContainerTop

func CreateHttpProxy

func CreateHttpProxy(ctx *HandlerCtx)

CreateHttpProxy

func CreateSocket5Proxy

func CreateSocket5Proxy(ctx *HandlerCtx)

CreateSocket5Proxy

func CreateTCPForward

func CreateTCPForward(ctx *HandlerCtx)

CreateTCPForward

func DockerImageRun

func DockerImageRun(ctx *HandlerCtx)

DockerImageRun

func DockerImages

func DockerImages(ctx *HandlerCtx)

DockerImages

func DockerInfo

func DockerInfo(ctx *HandlerCtx)

DockerInfo

func DockerPS

func DockerPS(ctx *HandlerCtx)

DockerPS

func DockerPull

func DockerPull(ctx *HandlerCtx)

DockerPull

func DockerRm

func DockerRm(ctx *HandlerCtx)

DockerRm docker rm

func DockerRmi

func DockerRmi(ctx *HandlerCtx)

DockerRmi docker rmi

func DockerRun

func DockerRun(ctx *HandlerCtx)

DockerRun

func DockerStateS

func DockerStateS(ctx *HandlerCtx)

DockerStateS

func DockerStop

func DockerStop(ctx *HandlerCtx)

DockerStop

func EnvDeployedCheck

func EnvDeployedCheck(ctx *HandlerCtx)

EnvDeployedCheck 检查是否安装指定软件

func ExecutableDeploy

func ExecutableDeploy(ctx *HandlerCtx)

ExecutableDeploy

func ExecutableKill

func ExecutableKill(ctx *HandlerCtx)

ExecutableKill

func ExecutablePIDLog

func ExecutablePIDLog(ctx *HandlerCtx)

ExecutablePIDLog

func ExecutableRunState

func ExecutableRunState(ctx *HandlerCtx)

ExecutableRunState 查看進程狀態

func GatewayRun

func GatewayRun(ctx *HandlerCtx)

GatewayRun

func GetSlavePathInfo

func GetSlavePathInfo(ctx *HandlerCtx)

GetSlavePathInfo 获取指定路径的目录与文件

func Handle

func Handle(c *protocol.UdpClient, s *protocol.Stream)

Handle

func HaveDocker

func HaveDocker(ctx *HandlerCtx)

HaveDocker

func Hello

func Hello(ctx *HandlerCtx)

Hello 接收slave上报的心跳数据

func InstallDocker

func InstallDocker(ctx *HandlerCtx)

InstallDocker 安装docker 返回的信息

func InstallNginx

func InstallNginx(ctx *HandlerCtx)

InstallNginx 安装nginx 返回的信息

func MonitorCPU

func MonitorCPU(slave string, performance *entity.SlavePerformance, ruleCPU float32)

MonitorCPU cpu是否超标

func MonitorConnectNum

func MonitorConnectNum(slave string, connectNum, ruleConnectNum int)

MonitorConnectNum 连接数是否超标

func MonitorDisk

func MonitorDisk(slave string, performance *entity.SlavePerformance, ruleDisk int)

MonitorDisk 磁盘存储是否超标

func MonitorMEM

func MonitorMEM(slave string, performance *entity.SlavePerformance, ruleMEM int64)

MonitorMEM 内存是否超标

func MonitorNotwork

func MonitorNotwork(slave string, performance *entity.SlavePerformance, ruleRx, ruleTx int)

MonitorNotwork 网络流量是否超标

func OnlineNotice

func OnlineNotice(slave, notice string)

OnlineNotice 发送 在线通知

func ProcessKill

func ProcessKill(ctx *HandlerCtx)

ProcessKill 關閉進程

func ProjectExecutableRun

func ProjectExecutableRun(ctx *HandlerCtx)

ProjectExecutableRun

func RemoveDocker

func RemoveDocker(ctx *HandlerCtx)

RemoveDocker 卸载docker 返回的信息

func RemoveNginx

func RemoveNginx(ctx *HandlerCtx)

RemoveNginx 卸载nginx 返回的信息

func ReportHostInfo

func ReportHostInfo(ctx *HandlerCtx)

ReportHostInfo

func RunUDPServer

func RunUDPServer()

RunUDPServer

func SlaveDiskInfo

func SlaveDiskInfo(ctx *HandlerCtx)

SlaveDiskInfo

func SlaveENVList

func SlaveENVList(ctx *HandlerCtx)

SlaveENVList

func SlaveHosts

func SlaveHosts(ctx *HandlerCtx)

SlaveHosts

func SlaveHostsUpdate

func SlaveHostsUpdate(ctx *HandlerCtx)

SlaveHostsUpdate

func SlavePathInfo

func SlavePathInfo(ctx *HandlerCtx)

SlavePathInfo

func SlavePortInfo

func SlavePortInfo(ctx *HandlerCtx)

SlavePortInfo

func SlaveProcessInfo

func SlaveProcessInfo(ctx *HandlerCtx)

SlaveProcessInfo

func SlaveProcessList

func SlaveProcessList(ctx *HandlerCtx)

SlaveProcessList

func UDPSend

func UDPSend(slave string, cmd protocol.CommandCode, data []byte) (string, error)

UDPSend

func UpdateHttpProxy

func UpdateHttpProxy(ctx *HandlerCtx)

UpdateHttpProxy

func UpdateSocket5Proxy

func UpdateSocket5Proxy(ctx *HandlerCtx)

UpdateSocket5Proxy

func UpdateTCPForward

func UpdateTCPForward(ctx *HandlerCtx)

UpdateTCPForward

func WarningNotice

func WarningNotice(ctx *HandlerCtx)

WarningNotice 收到来自slave的警告通知

Types

type HandlerCtx

type HandlerCtx struct {
	Cmd    protocol.CommandCode
	IP     string
	Stream *protocol.Stream
}

HandlerCtx udp slave 的 Handler 的上下文

func (*HandlerCtx) Send

func (handler *HandlerCtx) Send(data []byte) (string, error)

发送数据包给 master

type UDPHandler

type UDPHandler map[protocol.CommandCode]func(ctx *HandlerCtx)

UDPHandler

Jump to

Keyboard shortcuts

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