protobuf

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

proto

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWorkerServer

func RegisterWorkerServer(s *grpc.Server, srv WorkerServer)

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Argument represents one argument from a job.

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

func (*Argument) XXX_DiscardUnknown

func (m *Argument) XXX_DiscardUnknown()

func (*Argument) XXX_Marshal

func (m *Argument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Argument) XXX_Merge

func (m *Argument) XXX_Merge(src proto.Message)

func (*Argument) XXX_Size

func (m *Argument) XXX_Size() int

func (*Argument) XXX_Unmarshal

func (m *Argument) XXX_Unmarshal(b []byte) error

type FileChunk

type FileChunk struct {
	Chunk                []byte   `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

FileChunk represents one chunk of a file.

func (*FileChunk) Descriptor

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

func (*FileChunk) GetChunk

func (m *FileChunk) GetChunk() []byte

func (*FileChunk) ProtoMessage

func (*FileChunk) ProtoMessage()

func (*FileChunk) Reset

func (m *FileChunk) Reset()

func (*FileChunk) String

func (m *FileChunk) String() string

func (*FileChunk) XXX_DiscardUnknown

func (m *FileChunk) XXX_DiscardUnknown()

func (*FileChunk) XXX_Marshal

func (m *FileChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FileChunk) XXX_Merge

func (m *FileChunk) XXX_Merge(src proto.Message)

func (*FileChunk) XXX_Size

func (m *FileChunk) XXX_Size() int

func (*FileChunk) XXX_Unmarshal

func (m *FileChunk) XXX_Unmarshal(b []byte) error

type GitRepo

type GitRepo struct {
	PrivateKey           *PrivateKey `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	Username             string      `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password             string      `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	Url                  string      `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
	SelectedBranch       string      `protobuf:"bytes,5,opt,name=selected_branch,json=selectedBranch,proto3" json:"selected_branch,omitempty"`
	Branches             []string    `protobuf:"bytes,6,rep,name=branches,proto3" json:"branches,omitempty"`
	Localdest            string      `protobuf:"bytes,7,opt,name=localdest,proto3" json:"localdest,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

GitRepo is a git repo.

func (*GitRepo) Descriptor

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

func (*GitRepo) GetBranches

func (m *GitRepo) GetBranches() []string

func (*GitRepo) GetLocaldest

func (m *GitRepo) GetLocaldest() string

func (*GitRepo) GetPassword

func (m *GitRepo) GetPassword() string

func (*GitRepo) GetPrivateKey

func (m *GitRepo) GetPrivateKey() *PrivateKey

func (*GitRepo) GetSelectedBranch

func (m *GitRepo) GetSelectedBranch() string

func (*GitRepo) GetUrl

func (m *GitRepo) GetUrl() string

func (*GitRepo) GetUsername

func (m *GitRepo) GetUsername() string

func (*GitRepo) ProtoMessage

func (*GitRepo) ProtoMessage()

func (*GitRepo) Reset

func (m *GitRepo) Reset()

func (*GitRepo) String

func (m *GitRepo) String() string

func (*GitRepo) XXX_DiscardUnknown

func (m *GitRepo) XXX_DiscardUnknown()

func (*GitRepo) XXX_Marshal

func (m *GitRepo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GitRepo) XXX_Merge

func (m *GitRepo) XXX_Merge(src proto.Message)

func (*GitRepo) XXX_Size

func (m *GitRepo) XXX_Size() int

func (*GitRepo) XXX_Unmarshal

func (m *GitRepo) XXX_Unmarshal(b []byte) error

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            []*Job      `protobuf:"bytes,4,rep,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty"`
	Status               string      `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	Args                 []*Argument `protobuf:"bytes,6,rep,name=args,proto3" json:"args,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

Job represents one job from a pipeline run.

func (*Job) Descriptor

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

func (*Job) GetArgs

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

func (*Job) GetDependsOn

func (m *Job) GetDependsOn() []*Job

func (*Job) GetDescription

func (m *Job) GetDescription() string

func (*Job) GetStatus

func (m *Job) GetStatus() string

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

func (*Job) XXX_DiscardUnknown

func (m *Job) XXX_DiscardUnknown()

func (*Job) XXX_Marshal

func (m *Job) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Job) XXX_Merge

func (m *Job) XXX_Merge(src proto.Message)

func (*Job) XXX_Size

func (m *Job) XXX_Size() int

func (*Job) XXX_Unmarshal

func (m *Job) XXX_Unmarshal(b []byte) error

type LogChunk

type LogChunk struct {
	RunId                int64    `protobuf:"varint,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"`
	PipelineId           int64    `protobuf:"varint,2,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"`
	Chunk                []byte   `protobuf:"bytes,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LogChunk represents one chunk of a log file.

func (*LogChunk) Descriptor

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

func (*LogChunk) GetChunk

func (m *LogChunk) GetChunk() []byte

func (*LogChunk) GetPipelineId

func (m *LogChunk) GetPipelineId() int64

func (*LogChunk) GetRunId

func (m *LogChunk) GetRunId() int64

func (*LogChunk) ProtoMessage

func (*LogChunk) ProtoMessage()

func (*LogChunk) Reset

func (m *LogChunk) Reset()

func (*LogChunk) String

func (m *LogChunk) String() string

func (*LogChunk) XXX_DiscardUnknown

func (m *LogChunk) XXX_DiscardUnknown()

func (*LogChunk) XXX_Marshal

func (m *LogChunk) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogChunk) XXX_Merge

func (m *LogChunk) XXX_Merge(src proto.Message)

func (*LogChunk) XXX_Size

func (m *LogChunk) XXX_Size() int

func (*LogChunk) XXX_Unmarshal

func (m *LogChunk) XXX_Unmarshal(b []byte) error

type PipelineID

type PipelineID struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PipelineID) Descriptor

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

func (*PipelineID) GetId

func (m *PipelineID) GetId() int64

func (*PipelineID) ProtoMessage

func (*PipelineID) ProtoMessage()

func (*PipelineID) Reset

func (m *PipelineID) Reset()

func (*PipelineID) String

func (m *PipelineID) String() string

func (*PipelineID) XXX_DiscardUnknown

func (m *PipelineID) XXX_DiscardUnknown()

func (*PipelineID) XXX_Marshal

func (m *PipelineID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PipelineID) XXX_Merge

func (m *PipelineID) XXX_Merge(src proto.Message)

func (*PipelineID) XXX_Size

func (m *PipelineID) XXX_Size() int

func (*PipelineID) XXX_Unmarshal

func (m *PipelineID) XXX_Unmarshal(b []byte) error

type PipelineRun

type PipelineRun struct {
	UniqueId             string   `protobuf:"bytes,1,opt,name=unique_id,json=uniqueId,proto3" json:"unique_id,omitempty"`
	Id                   int64    `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Status               string   `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
	StartDate            int64    `protobuf:"varint,4,opt,name=start_date,json=startDate,proto3" json:"start_date,omitempty"`
	FinishDate           int64    `protobuf:"varint,5,opt,name=finish_date,json=finishDate,proto3" json:"finish_date,omitempty"`
	ScheduleDate         int64    `protobuf:"varint,6,opt,name=schedule_date,json=scheduleDate,proto3" json:"schedule_date,omitempty"`
	PipelineId           int64    `protobuf:"varint,7,opt,name=pipeline_id,json=pipelineId,proto3" json:"pipeline_id,omitempty"`
	PipelineName         string   `protobuf:"bytes,8,opt,name=pipeline_name,json=pipelineName,proto3" json:"pipeline_name,omitempty"`
	PipelineType         string   `protobuf:"bytes,9,opt,name=pipeline_type,json=pipelineType,proto3" json:"pipeline_type,omitempty"`
	ShaSum               []byte   `protobuf:"bytes,10,opt,name=sha_sum,json=shaSum,proto3" json:"sha_sum,omitempty"`
	Jobs                 []*Job   `protobuf:"bytes,11,rep,name=jobs,proto3" json:"jobs,omitempty"`
	Docker               bool     `protobuf:"varint,12,opt,name=docker,proto3" json:"docker,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PipelineRun represents one pipeline run.

func (*PipelineRun) Descriptor

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

func (*PipelineRun) GetDocker

func (m *PipelineRun) GetDocker() bool

func (*PipelineRun) GetFinishDate

func (m *PipelineRun) GetFinishDate() int64

func (*PipelineRun) GetId

func (m *PipelineRun) GetId() int64

func (*PipelineRun) GetJobs

func (m *PipelineRun) GetJobs() []*Job

func (*PipelineRun) GetPipelineId

func (m *PipelineRun) GetPipelineId() int64

func (*PipelineRun) GetPipelineName

func (m *PipelineRun) GetPipelineName() string

func (*PipelineRun) GetPipelineType

func (m *PipelineRun) GetPipelineType() string

func (*PipelineRun) GetScheduleDate

func (m *PipelineRun) GetScheduleDate() int64

func (*PipelineRun) GetShaSum

func (m *PipelineRun) GetShaSum() []byte

func (*PipelineRun) GetStartDate

func (m *PipelineRun) GetStartDate() int64

func (*PipelineRun) GetStatus

func (m *PipelineRun) GetStatus() string

func (*PipelineRun) GetUniqueId

func (m *PipelineRun) GetUniqueId() string

func (*PipelineRun) ProtoMessage

func (*PipelineRun) ProtoMessage()

func (*PipelineRun) Reset

func (m *PipelineRun) Reset()

func (*PipelineRun) String

func (m *PipelineRun) String() string

func (*PipelineRun) XXX_DiscardUnknown

func (m *PipelineRun) XXX_DiscardUnknown()

func (*PipelineRun) XXX_Marshal

func (m *PipelineRun) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PipelineRun) XXX_Merge

func (m *PipelineRun) XXX_Merge(src proto.Message)

func (*PipelineRun) XXX_Size

func (m *PipelineRun) XXX_Size() int

func (*PipelineRun) XXX_Unmarshal

func (m *PipelineRun) XXX_Unmarshal(b []byte) error

type PrivateKey

type PrivateKey struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Username             string   `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Password             string   `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

PrivateKey represents a key.

func (*PrivateKey) Descriptor

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

func (*PrivateKey) GetKey

func (m *PrivateKey) GetKey() string

func (*PrivateKey) GetPassword

func (m *PrivateKey) GetPassword() string

func (*PrivateKey) GetUsername

func (m *PrivateKey) GetUsername() string

func (*PrivateKey) ProtoMessage

func (*PrivateKey) ProtoMessage()

func (*PrivateKey) Reset

func (m *PrivateKey) Reset()

func (*PrivateKey) String

func (m *PrivateKey) String() string

func (*PrivateKey) XXX_DiscardUnknown

func (m *PrivateKey) XXX_DiscardUnknown()

func (*PrivateKey) XXX_Marshal

func (m *PrivateKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PrivateKey) XXX_Merge

func (m *PrivateKey) XXX_Merge(src proto.Message)

func (*PrivateKey) XXX_Size

func (m *PrivateKey) XXX_Size() int

func (*PrivateKey) XXX_Unmarshal

func (m *PrivateKey) XXX_Unmarshal(b []byte) error

type WorkerClient

type WorkerClient interface {
	// GetWork pulls work from the primary instance.
	GetWork(ctx context.Context, in *WorkerInstance, opts ...grpc.CallOption) (Worker_GetWorkClient, error)
	// UpdateWork updates work information at the primary instance.
	UpdateWork(ctx context.Context, in *PipelineRun, opts ...grpc.CallOption) (*empty.Empty, error)
	// StreamBinary streams a pipeline binary back to a worker instance.
	StreamBinary(ctx context.Context, in *PipelineRun, opts ...grpc.CallOption) (Worker_StreamBinaryClient, error)
	// StreamLogs streams pipeline run logs to the primary instance.
	StreamLogs(ctx context.Context, opts ...grpc.CallOption) (Worker_StreamLogsClient, error)
	// Deregister deregister a registered worker from the primary instance.
	Deregister(ctx context.Context, in *WorkerInstance, opts ...grpc.CallOption) (*empty.Empty, error)
	// GetGitRepo returns git repo information to the worker based on a pipeline name.
	GetGitRepo(ctx context.Context, in *PipelineID, opts ...grpc.CallOption) (*GitRepo, error)
}

WorkerClient is the client API for Worker service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWorkerClient

func NewWorkerClient(cc *grpc.ClientConn) WorkerClient

type WorkerInstance

type WorkerInstance struct {
	UniqueId             string   `protobuf:"bytes,1,opt,name=unique_id,json=uniqueId,proto3" json:"unique_id,omitempty"`
	WorkerSlots          int32    `protobuf:"varint,2,opt,name=worker_slots,json=workerSlots,proto3" json:"worker_slots,omitempty"`
	Tags                 []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

WorkerInstance represents the identity of a worker instance.

func (*WorkerInstance) Descriptor

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

func (*WorkerInstance) GetTags

func (m *WorkerInstance) GetTags() []string

func (*WorkerInstance) GetUniqueId

func (m *WorkerInstance) GetUniqueId() string

func (*WorkerInstance) GetWorkerSlots

func (m *WorkerInstance) GetWorkerSlots() int32

func (*WorkerInstance) ProtoMessage

func (*WorkerInstance) ProtoMessage()

func (*WorkerInstance) Reset

func (m *WorkerInstance) Reset()

func (*WorkerInstance) String

func (m *WorkerInstance) String() string

func (*WorkerInstance) XXX_DiscardUnknown

func (m *WorkerInstance) XXX_DiscardUnknown()

func (*WorkerInstance) XXX_Marshal

func (m *WorkerInstance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WorkerInstance) XXX_Merge

func (m *WorkerInstance) XXX_Merge(src proto.Message)

func (*WorkerInstance) XXX_Size

func (m *WorkerInstance) XXX_Size() int

func (*WorkerInstance) XXX_Unmarshal

func (m *WorkerInstance) XXX_Unmarshal(b []byte) error

type WorkerServer

type WorkerServer interface {
	// GetWork pulls work from the primary instance.
	GetWork(*WorkerInstance, Worker_GetWorkServer) error
	// UpdateWork updates work information at the primary instance.
	UpdateWork(context.Context, *PipelineRun) (*empty.Empty, error)
	// StreamBinary streams a pipeline binary back to a worker instance.
	StreamBinary(*PipelineRun, Worker_StreamBinaryServer) error
	// StreamLogs streams pipeline run logs to the primary instance.
	StreamLogs(Worker_StreamLogsServer) error
	// Deregister deregister a registered worker from the primary instance.
	Deregister(context.Context, *WorkerInstance) (*empty.Empty, error)
	// GetGitRepo returns git repo information to the worker based on a pipeline name.
	GetGitRepo(context.Context, *PipelineID) (*GitRepo, error)
}

WorkerServer is the server API for Worker service.

type Worker_GetWorkClient

type Worker_GetWorkClient interface {
	Recv() (*PipelineRun, error)
	grpc.ClientStream
}

type Worker_GetWorkServer

type Worker_GetWorkServer interface {
	Send(*PipelineRun) error
	grpc.ServerStream
}

type Worker_StreamBinaryClient

type Worker_StreamBinaryClient interface {
	Recv() (*FileChunk, error)
	grpc.ClientStream
}

type Worker_StreamBinaryServer

type Worker_StreamBinaryServer interface {
	Send(*FileChunk) error
	grpc.ServerStream
}

type Worker_StreamLogsClient

type Worker_StreamLogsClient interface {
	Send(*LogChunk) error
	CloseAndRecv() (*empty.Empty, error)
	grpc.ClientStream
}

type Worker_StreamLogsServer

type Worker_StreamLogsServer interface {
	SendAndClose(*empty.Empty) error
	Recv() (*LogChunk, error)
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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