grpc

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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