grpc

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandInfo

type CommandInfo struct {
	Cmd        *exec.Cmd
	Cancel     context.CancelFunc
	StartTime  time.Time
	Status     string
	Continuous bool
}

type CommandSrv

type CommandSrv struct {
	Commands map[string]*CommandInfo
	pb.UnimplementedCommandServer
	// contains filtered or unexported fields
}

func (*CommandSrv) ExecCommand

func (s *CommandSrv) ExecCommand(req *pb.ExecCommandReq, stream pb.Command_ExecCommandServer) error

func (*CommandSrv) ExecCommandSignal

func (s *CommandSrv) ExecCommandSignal(ctx context.Context, req *pb.ExecCommandSignalReq) (*pb.ExecCommandSignalResp, error)

func (*CommandSrv) GetCommandStatus

func (s *CommandSrv) GetCommandStatus(ctx context.Context, req *pb.GetCommandStatusReq) (*pb.GetCommandStatusResp, error)

New method to get the status of a command

type LuaSrv

type LuaSrv struct {
	pb.UnimplementedLuaServer
}

func (*LuaSrv) ExecLuaScript

func (s *LuaSrv) ExecLuaScript(ctx context.Context, req *pb.ExecLuaScriptReq) (*pb.ExecLuaScriptResp, error)

type PackageSrv

type PackageSrv struct {
	pb.UnimplementedPackageServer
	// contains filtered or unexported fields
}

func NewPackageSrv

func NewPackageSrv(pm *packages.PackageManager) *PackageSrv

func (*PackageSrv) ApplyConfigs

func (s *PackageSrv) ApplyConfigs(ctx context.Context, req *pb.ApplyConfigsReq) (*pb.ApplyConfigsResp, error)

func (*PackageSrv) GetConfigs

func (s *PackageSrv) GetConfigs(ctx context.Context, req *pb.GetConfigsReq) (*pb.GetConfigsResp, error)
	return &pb.StatusResp{
		IsRunning: isRunning,
	}, nil
}

func (*PackageSrv) GetRecentLogs

func (s *PackageSrv) GetRecentLogs(ctx context.Context, req *pb.GetRecentLogsReq) (*pb.GetRecentLogsResp, error)

func (*PackageSrv) PackageList

func (s *PackageSrv) PackageList(ctx context.Context, _ *emptypb.Empty) (*pb.PackageListResp, error)

func (*PackageSrv) Restart

func (s *PackageSrv) Restart(ctx context.Context, req *pb.RestartReq) (*emptypb.Empty, error)

func (*PackageSrv) Start

func (s *PackageSrv) Start(ctx context.Context, req *pb.StartReq) (*emptypb.Empty, error)

func (*PackageSrv) Stop

func (s *PackageSrv) Stop(ctx context.Context, req *pb.StopReq) (*emptypb.Empty, error)

Jump to

Keyboard shortcuts

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