MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / StartGRPCServer

Function StartGRPCServer

fs/runtime/grpc/grpc_func.go:344–358  ·  view source on GitHub ↗
(f *FSSReconcileServer, addr string)

Source from the content-addressed store, hash-verified

342}
343
344func StartGRPCServer(f *FSSReconcileServer, addr string) (*grpc.Server, error) {
345 lis, err := net.Listen("tcp", addr)
346 if err != nil {
347 return nil, err
348 }
349 s := grpc.NewServer()
350 proto.RegisterFSReconcileServer(s, f)
351 proto.RegisterFunctionServer(s, NewFunctionServerImpl(f))
352 go func() {
353 if err := s.Serve(lis); err != nil {
354 slog.Error("failed to serve", slog.Any("error", err))
355 }
356 }()
357 return s, nil
358}

Callers 1

TestFMWithGRPCRuntimeFunction · 0.85

Calls 4

RegisterFunctionServerFunction · 0.92
NewFunctionServerImplFunction · 0.85
ErrorMethod · 0.80

Tested by 1

TestFMWithGRPCRuntimeFunction · 0.68