Documentation ¶
Index ¶
- type Dependencies
- type WorkServer
- func (w *WorkServer) Deregister(ctx context.Context, workInst *pb.WorkerInstance) (*empty.Empty, error)
- func (w *WorkServer) GetGitRepo(ctx context.Context, in *pb.PipelineID) (*pb.GitRepo, error)
- func (w *WorkServer) GetWork(workInst *pb.WorkerInstance, serv pb.Worker_GetWorkServer) error
- func (w *WorkServer) StreamBinary(pipelineRun *pb.PipelineRun, serv pb.Worker_StreamBinaryServer) error
- func (w *WorkServer) StreamLogs(stream pb.Worker_StreamLogsServer) error
- func (w *WorkServer) UpdateWork(ctx context.Context, pipelineRun *pb.PipelineRun) (*empty.Empty, error)
- type WorkerServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependencies ¶
Dependencies defines dependencies of this service.
type WorkServer ¶
type WorkServer struct {
worker.UnimplementedWorkerServer
}
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.