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 接口的客户端适配器
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
Click to show internal directories.
Click to hide internal directories.