(port string, handler Handler)
| 33 | } |
| 34 | |
| 35 | func startFunctionRPC(port string, handler Handler) error { |
| 36 | lis, err := net.Listen("tcp", "localhost:"+port) |
| 37 | if err != nil { |
| 38 | log.Fatal(err) |
| 39 | } |
| 40 | err = rpc.Register(NewFunction(handler)) |
| 41 | if err != nil { |
| 42 | log.Fatal("failed to register handler function") |
| 43 | } |
| 44 | rpc.Accept(lis) |
| 45 | return errors.New("accept should not have returned") |
| 46 | } |
| 47 | |
| 48 | // Function struct which wrap the Handler |
| 49 | // |
nothing calls this directly
no test coverage detected
searching dependent graphs…