Documentation ¶
Index ¶
- type GrpcServer
- func (gr *GrpcServer) CancelBuild(ctx context.Context, req *lib.BuildCancelRequest) (*lib.BuildCancelResponse, error)
- func (gr *GrpcServer) GetBuildStatus(ctx context.Context, req *lib.BuildStatusRequest) (*lib.BuildStatusResponse, error)
- func (gr *GrpcServer) ListenRPC(addr string, port uint) error
- func (gr *GrpcServer) MonitorBuild(req *lib.BuildStatusRequest, stream lib.FuranExecutor_MonitorBuildServer) error
- func (gr *GrpcServer) Shutdown()
- func (gr *GrpcServer) StartBuild(ctx context.Context, req *lib.BuildRequest) (*lib.BuildRequestResponse, 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) *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, error)
CancelBuild stops a currently-running build
func (*GrpcServer) GetBuildStatus ¶
func (gr *GrpcServer) GetBuildStatus(ctx context.Context, req *lib.BuildStatusRequest) (*lib.BuildStatusResponse, 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) error
MonitorBuild streams events from a specified build
func (*GrpcServer) Shutdown ¶
func (gr *GrpcServer) Shutdown()
Shutdown gracefully stops the GRPC server, signals all workers and builds to stop and then waits for goroutines to finish
func (*GrpcServer) StartBuild ¶
func (gr *GrpcServer) StartBuild(ctx context.Context, req *lib.BuildRequest) (*lib.BuildRequestResponse, 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.