- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for streamHandler (0.14 sec)
-
internal/grid/grid_test.go
} } // 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...) b = append(b, in...)
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/muxserver.go
LastPing: time.Now().Unix(), BaseFlags: c.baseFlags, } go func() { // TODO: Handle }() return &m } func newMuxStream(ctx context.Context, msg message, c *Connection, handler StreamHandler) *muxServer { var cancel context.CancelFunc ctx = setCaller(ctx, c.remote) if len(handler.Subroute) > 0 { ctx = setSubroute(ctx, handler.Subroute) } if msg.DeadlineMS > 0 {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 9.7K bytes - Viewed (0) -
internal/grid/handlers.go
// Buffers sent on out can not be referenced once sent. StreamHandlerFn func(ctx context.Context, payload []byte, in <-chan []byte, out chan<- []byte) *RemoteErr // StreamHandler handles fully bidirectional streams, // There is flow control in both directions. StreamHandler struct { // Handle an incoming request. Initial payload is sent. // Additional input packets (if any) are streamed to request.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 16:58:30 UTC 2024 - 27.7K bytes - Viewed (0) -
internal/grid/connection_test.go
defer close(cleanReqs) // 1: Block forever h1 := func(payload []byte) ([]byte, *RemoteErr) { gotCall <- struct{}{} <-cleanReqs return nil, nil } // 2: Also block, but with streaming. h2 := StreamHandler{ Handle: func(ctx context.Context, payload []byte, request <-chan []byte, resp chan<- []byte) *RemoteErr { gotCall <- struct{}{} select { case <-ctx.Done(): gotCall <- struct{}{}
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/benchmark_test.go
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++ { toSend := GetByteBuffer()[:0]
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/manager.go
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) -
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") createStorage := func(endpoint Endpoint) bool {
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) -
internal/grid/connection.go
return } _, _ = c.inStream.LoadOrCompute(m.MuxID, func() *muxServer { return newMuxStateless(ctx, m, c, *handler) }) } else { // Stream: var handler *StreamHandler if subID == nil { if !m.Handler.valid() { gridLogIf(ctx, c.queueMsg(m, muxConnectError{Error: "Invalid Handler"})) return } handler = c.handlers.streams[m.Handler] } else {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 46.7K bytes - Viewed (0)