proto

package module
v0.0.0-...-7be8a90 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2018 License: Apache-2.0 Imports: 5 Imported by: 10

README

proto

This folder contains gRPC proto files and their generated language defintions for the gaia plugin interface.

You can use protoc to compile these on your own: protoc -I ./ ./plugin.proto --go_out=plugins=grpc:./

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

plugin.proto

It has these top-level messages:

Job
Argument
ManualInteraction
JobResult
Empty

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPluginServer

func RegisterPluginServer(s *grpc.Server, srv PluginServer)

Types

type Argument

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

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

func (*Argument) Descriptor

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

func (*Argument) GetDescription

func (m *Argument) GetDescription() string

func (*Argument) GetKey

func (m *Argument) GetKey() string

func (*Argument) GetType

func (m *Argument) GetType() string

func (*Argument) GetValue

func (m *Argument) GetValue() string

func (*Argument) ProtoMessage

func (*Argument) ProtoMessage()

func (*Argument) Reset

func (m *Argument) Reset()

func (*Argument) String

func (m *Argument) String() string

type Empty

type Empty struct {
}

Empty message

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

type Job

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

Job represents a single job

func (*Job) Descriptor

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

func (*Job) GetArgs

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

func (*Job) GetDependson

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

func (*Job) GetDescription

func (m *Job) GetDescription() string

func (*Job) GetInteraction

func (m *Job) GetInteraction() *ManualInteraction

func (*Job) GetTitle

func (m *Job) GetTitle() string

func (*Job) GetUniqueId

func (m *Job) GetUniqueId() uint32

func (*Job) ProtoMessage

func (*Job) ProtoMessage()

func (*Job) Reset

func (m *Job) Reset()

func (*Job) String

func (m *Job) String() string

type JobResult

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

JobResult represents the result of an executed job

func (*JobResult) Descriptor

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

func (*JobResult) GetExitPipeline

func (m *JobResult) GetExitPipeline() bool

func (*JobResult) GetFailed

func (m *JobResult) GetFailed() bool

func (*JobResult) GetMessage

func (m *JobResult) GetMessage() string

func (*JobResult) GetUniqueId

func (m *JobResult) GetUniqueId() uint32

func (*JobResult) ProtoMessage

func (*JobResult) ProtoMessage()

func (*JobResult) Reset

func (m *JobResult) Reset()

func (*JobResult) String

func (m *JobResult) String() string

type ManualInteraction

type ManualInteraction struct {
	Description string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
	Type        string `protobuf:"bytes,2,opt,name=type" json:"type,omitempty"`
	Value       string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
}

ManualInteraction represents a manual human interaction

func (*ManualInteraction) Descriptor

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

func (*ManualInteraction) GetDescription

func (m *ManualInteraction) GetDescription() string

func (*ManualInteraction) GetType

func (m *ManualInteraction) GetType() string

func (*ManualInteraction) GetValue

func (m *ManualInteraction) GetValue() string

func (*ManualInteraction) ProtoMessage

func (*ManualInteraction) ProtoMessage()

func (*ManualInteraction) Reset

func (m *ManualInteraction) Reset()

func (*ManualInteraction) String

func (m *ManualInteraction) String() string

type PluginClient

type PluginClient interface {
	// GetJobs returns a stream of Job objects.
	// Used to expose jobs to gaia.
	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)
}

func NewPluginClient

func NewPluginClient(cc *grpc.ClientConn) PluginClient

type PluginServer

type PluginServer interface {
	// GetJobs returns a stream of Job objects.
	// Used to expose jobs to gaia.
	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)
}

type Plugin_GetJobsClient

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

type Plugin_GetJobsServer

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

Jump to

Keyboard shortcuts

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