- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for h1 (0.11 sec)
-
internal/grid/grid_test.go
remote := grid.Managers[1] // 1: Echo h1 := NewSingleHandler[*testRequest, *testResponse](handlerTest, func() *testRequest { return &testRequest{} }, func() *testResponse { return &testResponse{} }) // Handles incoming requests, returns a response handler1 := func(req *testRequest) (resp *testResponse, err *RemoteErr) { resp = h1.NewResponse() *resp = testResponse{ OrgNum: req.Num,
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Apr 30 15:03:35 GMT 2024 - 30.1K bytes - Viewed (0) -
internal/grid/connection.go
func (c *Connection) shouldConnect() bool { // The remote should have the opposite result. h0 := xxh3.HashString(c.Local + c.Remote) h1 := xxh3.HashString(c.Remote + c.Local) if h0 == h1 { return c.Local < c.Remote } return h0 < h1 } func (c *Connection) send(ctx context.Context, msg []byte) error { select { case <-ctx.Done(): // Returning error here is too noisy. return nil
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 42.6K bytes - Viewed (0) -
internal/grid/connection_test.go
panic("should not be called") } return nil }, OutCapacity: 1, InCapacity: 1, } errFatal(remote.RegisterSingleHandler(handlerTest, h1)) errFatal(remote.RegisterStreamingHandler(handlerTest2, h2)) errFatal(local.RegisterSingleHandler(handlerTest, h1)) errFatal(local.RegisterStreamingHandler(handlerTest2, h2)) // local to remote remoteConn := local.Connection(remoteHost)
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 6K bytes - Viewed (0)