plugin

package
v0.0.0-...-d892afd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_api_v1_plugin_plugin_proto protoreflect.FileDescriptor
View Source
var Plugin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Plugin",
	HandlerType: (*PluginServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ExecuteJob",
			Handler:    _Plugin_ExecuteJob_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetJobs",
			Handler:       _Plugin_GetJobs_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/api/v1/plugin/plugin.proto",
}

Plugin_ServiceDesc is the grpc.ServiceDesc for Plugin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPluginServer

func RegisterPluginServer(s grpc.ServiceRegistrar, srv PluginServer)

Types

type Argument

type Argument struct {
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Type        string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Key         string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	Value       string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Argument represents an argument passed from a pipeline to Bhojpur Belaur and/or from Belaur to the pipeline.

func (*Argument) Descriptor deprecated

func (*Argument) Descriptor() ([]byte, []int)

Deprecated: Use Argument.ProtoReflect.Descriptor instead.

func (*Argument) GetDescription

func (x *Argument) GetDescription() string

func (*Argument) GetKey

func (x *Argument) GetKey() string

func (*Argument) GetType

func (x *Argument) GetType() string

func (*Argument) GetValue

func (x *Argument) GetValue() string

func (*Argument) ProtoMessage

func (*Argument) ProtoMessage()

func (*Argument) ProtoReflect

func (x *Argument) ProtoReflect() protoreflect.Message

func (*Argument) Reset

func (x *Argument) Reset()

func (*Argument) String

func (x *Argument) String() string

type Empty

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

Empty message

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type Job

type Job struct {
	UniqueId    uint32             `protobuf:"varint,1,opt,name=unique_id,json=uniqueId,proto3" json:"unique_id,omitempty"`
	Title       string             `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Description string             `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Dependson   []uint32           `protobuf:"varint,4,rep,packed,name=dependson,proto3" json:"dependson,omitempty"`
	Args        []*Argument        `protobuf:"bytes,5,rep,name=args,proto3" json:"args,omitempty"`
	Interaction *ManualInteraction `protobuf:"bytes,6,opt,name=interaction,proto3" json:"interaction,omitempty"`
	// contains filtered or unexported fields
}

Job represents a single job

func (*Job) Descriptor deprecated

func (*Job) Descriptor() ([]byte, []int)

Deprecated: Use Job.ProtoReflect.Descriptor instead.

func (*Job) GetArgs

func (x *Job) GetArgs() []*Argument

func (*Job) GetDependson

func (x *Job) GetDependson() []uint32

func (*Job) GetDescription

func (x *Job) GetDescription() string

func (*Job) GetInteraction

func (x *Job) GetInteraction() *ManualInteraction

func (*Job) GetTitle

func (x *Job) GetTitle() string

func (*Job) GetUniqueId

func (x *Job) GetUniqueId() uint32

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) ProtoReflect

func (x *Job) ProtoReflect() protoreflect.Message

func (*Job) Reset

func (x *Job) Reset()

func (*Job) String

func (x *Job) String() string

type JobResult

type JobResult struct {
	UniqueId     uint32 `protobuf:"varint,1,opt,name=unique_id,json=uniqueId,proto3" json:"unique_id,omitempty"`
	Failed       bool   `protobuf:"varint,2,opt,name=failed,proto3" json:"failed,omitempty"`
	ExitPipeline bool   `protobuf:"varint,3,opt,name=exit_pipeline,json=exitPipeline,proto3" json:"exit_pipeline,omitempty"`
	Message      string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

JobResult represents the result of an executed job

func (*JobResult) Descriptor deprecated

func (*JobResult) Descriptor() ([]byte, []int)

Deprecated: Use JobResult.ProtoReflect.Descriptor instead.

func (*JobResult) GetExitPipeline

func (x *JobResult) GetExitPipeline() bool

func (*JobResult) GetFailed

func (x *JobResult) GetFailed() bool

func (*JobResult) GetMessage

func (x *JobResult) GetMessage() string

func (*JobResult) GetUniqueId

func (x *JobResult) GetUniqueId() uint32

func (*JobResult) ProtoMessage

func (*JobResult) ProtoMessage()

func (*JobResult) ProtoReflect

func (x *JobResult) ProtoReflect() protoreflect.Message

func (*JobResult) Reset

func (x *JobResult) Reset()

func (*JobResult) String

func (x *JobResult) String() string

type ManualInteraction

type ManualInteraction struct {
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	Type        string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Value       string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

ManualInteraction represents a manual human interaction

func (*ManualInteraction) Descriptor deprecated

func (*ManualInteraction) Descriptor() ([]byte, []int)

Deprecated: Use ManualInteraction.ProtoReflect.Descriptor instead.

func (*ManualInteraction) GetDescription

func (x *ManualInteraction) GetDescription() string

func (*ManualInteraction) GetType

func (x *ManualInteraction) GetType() string

func (*ManualInteraction) GetValue

func (x *ManualInteraction) GetValue() string

func (*ManualInteraction) ProtoMessage

func (*ManualInteraction) ProtoMessage()

func (*ManualInteraction) ProtoReflect

func (x *ManualInteraction) ProtoReflect() protoreflect.Message

func (*ManualInteraction) Reset

func (x *ManualInteraction) Reset()

func (*ManualInteraction) String

func (x *ManualInteraction) String() string

type PluginClient

type PluginClient interface {
	// GetJobs returns a stream of Job objects.
	// Used to expose jobs to Bhojpur Belaur.
	GetJobs(ctx context.Context, in *Empty, opts ...grpc.CallOption) (Plugin_GetJobsClient, error)
	// ExecuteJob signals the plugin to execute the given job.
	// Used to execute one job from a pipeline.
	ExecuteJob(ctx context.Context, in *Job, opts ...grpc.CallOption) (*JobResult, error)
}

PluginClient is the client API for Plugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPluginClient

func NewPluginClient(cc grpc.ClientConnInterface) PluginClient

type PluginServer

type PluginServer interface {
	// GetJobs returns a stream of Job objects.
	// Used to expose jobs to Bhojpur Belaur.
	GetJobs(*Empty, Plugin_GetJobsServer) error
	// ExecuteJob signals the plugin to execute the given job.
	// Used to execute one job from a pipeline.
	ExecuteJob(context.Context, *Job) (*JobResult, error)
	// contains filtered or unexported methods
}

PluginServer is the server API for Plugin service. All implementations must embed UnimplementedPluginServer for forward compatibility

type Plugin_GetJobsClient

type Plugin_GetJobsClient interface {
	Recv() (*Job, error)
	grpc.ClientStream
}

type Plugin_GetJobsServer

type Plugin_GetJobsServer interface {
	Send(*Job) error
	grpc.ServerStream
}

type UnimplementedPluginServer

type UnimplementedPluginServer struct {
}

UnimplementedPluginServer must be embedded to have forward compatible implementations.

func (UnimplementedPluginServer) ExecuteJob

func (UnimplementedPluginServer) GetJobs

type UnsafePluginServer

type UnsafePluginServer interface {
	// contains filtered or unexported methods
}

UnsafePluginServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServer will result in compilation errors.

Jump to

Keyboard shortcuts

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