server

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: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies struct {
	Certificate security.CAAPI
}

Dependencies defines dependencies of this service.

type WorkServer

type WorkServer struct{}

WorkServer is the implementation of the worker gRPC server interface.

func (*WorkServer) Deregister

func (w *WorkServer) Deregister(ctx context.Context, workInst *pb.WorkerInstance) (*empty.Empty, error)

Deregister removes a worker from this primary instance by deleting the object from store.

func (*WorkServer) GetGitRepo

func (w *WorkServer) GetGitRepo(ctx context.Context, in *pb.PipelineID) (*pb.GitRepo, error)

GetGitRepo retrieves repository information associated with a pipline.

func (*WorkServer) GetWork

func (w *WorkServer) GetWork(workInst *pb.WorkerInstance, serv pb.Worker_GetWorkServer) error

GetWork gets pipeline runs from the store which are not scheduled yet and streams them back to the requesting worker. Pipeline runs are filtered by their tags.

func (*WorkServer) StreamBinary

func (w *WorkServer) StreamBinary(pipelineRun *pb.PipelineRun, serv pb.Worker_StreamBinaryServer) error

StreamBinary streams a pipeline binary in chunks back to the worker.

func (*WorkServer) StreamLogs

func (w *WorkServer) StreamLogs(stream pb.Worker_StreamLogsServer) error

StreamLogs streams logs in chunks from the client to the primary instance.

func (*WorkServer) UpdateWork

func (w *WorkServer) UpdateWork(ctx context.Context, pipelineRun *pb.PipelineRun) (*empty.Empty, error)

UpdateWork updates work from a worker.

type WorkerServer

type WorkerServer struct {
	Dependencies
}

WorkerServer represents an instance of the worker server implementation

func InitWorkerServer

func InitWorkerServer(deps Dependencies) *WorkerServer

InitWorkerServer creates a new worker server instance.

func (*WorkerServer) Start

func (w *WorkerServer) Start() error

Start starts the gRPC worker server. It returns an error when something badly happens.

Jump to

Keyboard shortcuts

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