MCPcopy
hub / github.com/spacecloud-io/space-cloud / Start

Method Start

runner/modules/scaler/operations.go:34–49  ·  view source on GitHub ↗

Start begins the grpc server

()

Source from the content-addressed store, hash-verified

32
33// Start begins the grpc server
34func (s *Scaler) Start() {
35 // Start the internal routines
36 go s.routineScaleUp()
37
38 // Create a gRPC server
39 lis, err := net.Listen("tcp", fmt.Sprintf(":%d", 4060))
40 if err != nil {
41 panic("Unable to start grpc server: " + err.Error())
42 }
43
44 grpcServer := grpc.NewServer()
45 pb.RegisterExternalScalerServer(grpcServer, s)
46 if err := grpcServer.Serve(lis); err != nil {
47 panic("Unable to start grpc server: " + err.Error())
48 }
49}

Callers

nothing calls this directly

Calls 2

routineScaleUpMethod · 0.95
ErrorMethod · 0.65

Tested by

no test coverage detected