- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for RegisterStreamingHandler (0.12 sec)
-
internal/grid/connection_test.go
} 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) errFatal(remoteConn.WaitForConnect(context.Background()))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:44:00 UTC 2024 - 5.9K bytes - Viewed (0) -
internal/grid/grid_test.go
if err != nil { t.Fatal(err) } } // We fake a local and remote server. remoteHost := remote.HostName() // 1: Echo register := func(manager *Manager) { errFatal(manager.RegisterStreamingHandler(handlerTest, StreamHandler{ Handle: func(ctx context.Context, payload []byte, request <-chan []byte, resp chan<- []byte) *RemoteErr { for in := range request { b := append([]byte{}, payload...)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 36.4K bytes - Viewed (0) -
internal/grid/manager.go
m.handlers.stateless[id] = &h return nil } */ // RegisterStreamingHandler will register a stateless handler that serves // two-way streaming requests. func (m *Manager) RegisterStreamingHandler(id HandlerID, h StreamHandler) error { if !id.valid() { return ErrUnknownHandler } if debugPrint { fmt.Println("RegisterStreamingHandler: subroute:", h.Subroute) } if h.Subroute == "" {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 10.6K bytes - Viewed (0) -
internal/grid/benchmark_test.go
errFatal(err) b.Cleanup(grid.Cleanup) const responses = 10 // Create n managers. for _, remote := range grid.Managers { // Register a single handler which echos the payload. errFatal(remote.RegisterStreamingHandler(handlerTest, StreamHandler{ // Send 10x response. Handle: func(ctx context.Context, payload []byte, _ <-chan []byte, out chan<- []byte) *RemoteErr { for i := 0; i < responses; i++ {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
internal/grid/README.md
grid.PutByteBuffer(req) } } // out is closed by the caller and should never be closed by the handler. return nil } err := manager.RegisterStreamingHandler(grid.HandlerDiskInfo, StreamHandler{ Handle: handler, Subroute: "asubroute", OutCapacity: 1, InCapacity: 1, }) ``` Sample call: ```go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Jan 18 07:03:17 UTC 2024 - 9.4K bytes - Viewed (0) -
internal/grid/handlers.go
func (h *StreamTypeHandler[Payload, Req, Resp]) register(m *Manager, handle func(ctx context.Context, p Payload, in <-chan Req, out chan<- Resp) *RemoteErr, subroute ...string) error { return m.RegisterStreamingHandler(h.id, StreamHandler{ Handle: func(ctx context.Context, payload []byte, in <-chan []byte, out chan<- []byte) *RemoteErr { var plT Payload if h.WithPayload { plT = h.NewPayload()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 27.7K bytes - Viewed (0) -
cmd/storage-rest-server.go
logger.FatalIf(storageStatVolRPC.Register(gm, server.StatVolHandler, endpoint.Path), "unable to register handler") logger.FatalIf(gm.RegisterStreamingHandler(grid.HandlerWalkDir, grid.StreamHandler{ Subroute: endpoint.Path, Handle: server.WalkDirHandler, OutCapacity: 1, }), "unable to register handler")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Aug 14 17:11:51 UTC 2024 - 45.7K bytes - Viewed (0) -
cmd/peer-rest-server.go
logger.FatalIf(cleanupUploadIDCacheMetaRPC.Register(gm, server.HandlerClearUploadID), "unable to register handler") logger.FatalIf(gm.RegisterStreamingHandler(grid.HandlerTrace, grid.StreamHandler{ Handle: server.TraceHandler, Subroute: "", OutCapacity: 100000, InCapacity: 0, }), "unable to register handler")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 11:32:32 UTC 2024 - 53.2K bytes - Viewed (0)