baserpc

package
v1.2.2-sp4 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MethodList = []string{"ManagerAPI_ReadDir", "ManagerAPI_ReadDirRecursive", "ManagerAPI_ReadFile", "ManagerAPI_Shutdown", "ManagerAPI_Restart", "ManagerAPI_Echo", "ManagerAPI_Exec"}
)

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	Name            string
	Path            string
	IsDir           bool
	ModifyTimestamp int64
	BytesSize       int64
	Mode            uint32
}

type ManagerAPIClientHelper

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

func GenerateManagerAPIClientHelper

func GenerateManagerAPIClientHelper(callRpc callRpcHandler) *ManagerAPIClientHelper

func (*ManagerAPIClientHelper) ManagerAPI_Echo

func (*ManagerAPIClientHelper) ManagerAPI_Exec

func (*ManagerAPIClientHelper) ManagerAPI_ReadDir

func (*ManagerAPIClientHelper) ManagerAPI_ReadDirRecursive

func (*ManagerAPIClientHelper) ManagerAPI_ReadFile

func (*ManagerAPIClientHelper) ManagerAPI_Restart

func (*ManagerAPIClientHelper) ManagerAPI_Shutdown

type ManagerAPIServerHelper

type ManagerAPIServerHelper struct {
	DoManagerAPI_ReadDir          func(ctx context.Context, node string, req *ManagerAPI_ReadDirRequest, broker *mq.Broker) (*ManagerAPI_ReadDirResponse, error)
	DoManagerAPI_ReadDirRecursive func(ctx context.Context, node string, req *ManagerAPI_ReadDirRecursiveRequest, broker *mq.Broker) (*ManagerAPI_ReadDirRecursiveResponse, error)
	DoManagerAPI_ReadFile         func(ctx context.Context, node string, req *ManagerAPI_ReadFileRequest, broker *mq.Broker) (*ManagerAPI_ReadFileResponse, error)
	DoManagerAPI_Shutdown         func(ctx context.Context, node string, req *ManagerAPI_ShutdownRequest, broker *mq.Broker) (*ManagerAPI_ShutdownResponse, error)
	DoManagerAPI_Restart          func(ctx context.Context, node string, req *ManagerAPI_RestartRequest, broker *mq.Broker) (*ManagerAPI_RestartResponse, error)
	DoManagerAPI_Echo             func(ctx context.Context, node string, req *ManagerAPI_EchoRequest, broker *mq.Broker) (*ManagerAPI_EchoResponse, error)
	DoManagerAPI_Exec             func(ctx context.Context, node string, req *ManagerAPI_ExecRequest, broker *mq.Broker) (*ManagerAPI_ExecResponse, error)
}

func NewManagerAPIServerHelper

func NewManagerAPIServerHelper() *ManagerAPIServerHelper

func (*ManagerAPIServerHelper) Do

func (h *ManagerAPIServerHelper) Do(broker *mq.Broker, ctx context.Context, f, node string, delivery *amqp.Delivery) (message interface{}, e error)

type ManagerAPI_EchoRequest

type ManagerAPI_EchoRequest struct {
	Data string
}

type ManagerAPI_EchoResponse

type ManagerAPI_EchoResponse struct {
	Data string
}

type ManagerAPI_ExecRequest

type ManagerAPI_ExecRequest struct {
	TimeoutStr string
	Binary     string
	Args       []string
}

type ManagerAPI_ExecResponse

type ManagerAPI_ExecResponse struct {
	CombinedOutput []byte
}

type ManagerAPI_ReadDirRecursiveRequest

type ManagerAPI_ReadDirRecursiveRequest struct {
	Target string
}

type ManagerAPI_ReadDirRecursiveResponse

type ManagerAPI_ReadDirRecursiveResponse struct {
	Infos []*FileInfo
}

type ManagerAPI_ReadDirRequest

type ManagerAPI_ReadDirRequest struct {
	Target string
}

type ManagerAPI_ReadDirResponse

type ManagerAPI_ReadDirResponse struct {
	Infos []*FileInfo
}

type ManagerAPI_ReadFileRequest

type ManagerAPI_ReadFileRequest struct {
	FileName string
}

type ManagerAPI_ReadFileResponse

type ManagerAPI_ReadFileResponse struct {
	Raw []byte
}

type ManagerAPI_RestartRequest

type ManagerAPI_RestartRequest struct{}

type ManagerAPI_RestartResponse

type ManagerAPI_RestartResponse struct {
	Ok     bool
	Reason string
}

type ManagerAPI_ShutdownRequest

type ManagerAPI_ShutdownRequest struct{}

type ManagerAPI_ShutdownResponse

type ManagerAPI_ShutdownResponse struct {
	Ok     bool
	Reason string
}

Jump to

Keyboard shortcuts

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