shared

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHandshakeConfig

func GetHandshakeConfig(token string) plugin.HandshakeConfig

GetHandshakeConfig 确保主程序与插件版本兼容

Types

type Job

type Job interface {
	InvokeService(request *protobuf.JobInvokeServiceRequest) (*protobuf.JobInvokeServiceResponse, error)
}

type Task

type Task interface {
	Execute(ctx context.Context, request *protobuf.TaskExecuteRequest) (*protobuf.TaskExecuteResponse, error)
}

type TaskClient

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

TaskClient 实现 Task 接口的客户端适配器

func (*TaskClient) Execute

func (c *TaskClient) Execute(params map[string]string) (string, error)

type TaskPlugin

type TaskPlugin struct {
	plugin.NetRPCUnsupportedPlugin
	Impl protobuf.TaskServer
	Job  protobuf.JobClient
}

func (TaskPlugin) GRPCClient

func (t TaskPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, conn *grpc.ClientConn) (interface{}, error)

func (TaskPlugin) GRPCServer

func (t TaskPlugin) GRPCServer(broker *plugin.GRPCBroker, server *grpc.Server) error

Jump to

Keyboard shortcuts

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