Documentation ¶
Index ¶
- type GrpcServer
- func (gr *GrpcServer) CancelBuild(ctx context.Context, req *lib.BuildCancelRequest) (_ *lib.BuildCancelResponse, err error)
- func (gr *GrpcServer) GetBuildStatus(ctx context.Context, req *lib.BuildStatusRequest) (_ *lib.BuildStatusResponse, err error)
- func (gr *GrpcServer) ListenRPC(addr string, port uint) error
- func (gr *GrpcServer) MonitorBuild(req *lib.BuildStatusRequest, stream lib.FuranExecutor_MonitorBuildServer) (err error)
- func (gr *GrpcServer) Shutdown()
- func (gr *GrpcServer) StartBuild(ctx context.Context, req *lib.BuildRequest) (_ *lib.BuildRequestResponse, err error)
- func (gr *GrpcServer) WorkerChan() chan *workerRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GrpcServer ¶
type GrpcServer struct {
// contains filtered or unexported fields
}
GrpcServer represents an object that responds to gRPC calls
func NewGRPCServer ¶
func NewGRPCServer(ib builder.ImageBuildPusher, dl datalayer.DataLayer, ep kafka.EventBusProducer, ec kafka.EventBusConsumer, mc metrics.MetricsCollector, kvo consul.KeyValueOrchestrator, queuesize uint, concurrency uint, logger *log.Logger, serviceName string) *GrpcServer
NewGRPCServer returns a new instance of the gRPC server
func (*GrpcServer) CancelBuild ¶
func (gr *GrpcServer) CancelBuild(ctx context.Context, req *lib.BuildCancelRequest) (_ *lib.BuildCancelResponse, err error)
CancelBuild stops a currently-running build
func (*GrpcServer) GetBuildStatus ¶
func (gr *GrpcServer) GetBuildStatus(ctx context.Context, req *lib.BuildStatusRequest) (_ *lib.BuildStatusResponse, err error)
func (*GrpcServer) ListenRPC ¶
func (gr *GrpcServer) ListenRPC(addr string, port uint) error
ListenRPC starts the RPC listener on addr:port
func (*GrpcServer) MonitorBuild ¶
func (gr *GrpcServer) MonitorBuild(req *lib.BuildStatusRequest, stream lib.FuranExecutor_MonitorBuildServer) (err error)
MonitorBuild streams events from a specified build
func (*GrpcServer) Shutdown ¶
func (gr *GrpcServer) Shutdown()
Shutdown gracefully stops the GRPC server, signals all workers to stop, waits for builds to finish (with timeout) and then waits for goroutines to finish
func (*GrpcServer) StartBuild ¶
func (gr *GrpcServer) StartBuild(ctx context.Context, req *lib.BuildRequest) (_ *lib.BuildRequestResponse, err error)
gRPC handlers
func (*GrpcServer) WorkerChan ¶
func (gr *GrpcServer) WorkerChan() chan *workerRequest
WorkerChan returns the worker chan
Click to show internal directories.
Click to hide internal directories.