shared

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJobClient added in v0.0.2

func NewJobClient() (protobuf.JobClient, error)

func NewPluginClient added in v0.0.2

func NewPluginClient(jobServerAddress, taskPluginPath, taskPluginName string, logger *log.Logger) *plugin.Client

func PluginServe added in v0.0.2

func PluginServe(taskName string, taskServer protobuf.TaskServer)

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
}

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