- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for RemoteErr (0.12 sec)
-
internal/grid/connection_test.go
errFatal(local.RegisterSingleHandler(handlerTest, func(payload []byte) ([]byte, *RemoteErr) { t.Log("1: server payload: ", len(payload), "bytes.") return append([]byte{}, payload...), nil })) // 2: Return as error errFatal(local.RegisterSingleHandler(handlerTest2, func(payload []byte) ([]byte, *RemoteErr) { t.Log("2: server payload: ", len(payload), "bytes.") err := RemoteErr(payload) return nil, &err }))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 08 21:44:00 UTC 2024 - 5.9K bytes - Viewed (0) -
cmd/lock-rest-server.go
resp := lockRPCLock.NewResponse() success, err := l.ll.Lock(context.Background(), *args) if err == nil && !success { return l.makeResp(resp, errLockConflict) } return l.makeResp(resp, err) } // UnlockHandler - releases the acquired lock. func (l *lockRESTServer) UnlockHandler(args *dsync.LockArgs) (*dsync.LockResp, *grid.RemoteErr) { resp := lockRPCUnlock.NewResponse()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 5.8K bytes - Viewed (0) -
internal/grid/README.md
The server handler function has this signature: `type SingleHandlerFn func(payload []byte) ([]byte, *RemoteErr)`. Sample handler: ```go handler := func(payload []byte) ([]byte, *grid.RemoteErr) { // Do something with payload return []byte("response"), nil } err := manager.RegisterSingleHandler(grid.HandlerDiskInfo, handler) ```
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/muxserver.go
start := time.Now() defer func() { if debugPrint { fmt.Println("Mux", m.ID, "Handler took", time.Since(start).Round(time.Millisecond)) } if r := recover(); r != nil { gridLogIf(ctx, fmt.Errorf("grid handler (%v) panic: %v", msg.Handler, r)) err := RemoteErr(fmt.Sprintf("handler panic: %v", r)) handlerErr = &err }
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/grid.go
"strings" "sync" "time" "github.com/gobwas/ws" "github.com/gobwas/ws/wsutil" ) // ErrDisconnected is returned when the connection to the remote has been lost during the call. var ErrDisconnected = RemoteErr("remote disconnected") const ( // minBufferSize is the minimum buffer size. // Buffers below this is not reused. minBufferSize = 1 << 10 // defaultBufferSize is the default buffer allocation size.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 6.9K bytes - Viewed (0) -
cmd/bootstrap-peer-server.go
cmdLines = append(cmdLines, ep.CmdLine) } scfg.CmdLines = cmdLines return scfg } func (s *bootstrapRESTServer) VerifyHandler(params *grid.MSS) (*ServerSystemConfig, *grid.RemoteErr) { return getServerSystemCfg(), nil } var serverVerifyHandler = grid.NewSingleHandler[*grid.MSS, *ServerSystemConfig](grid.HandlerServerVerify, grid.NewMSS, func() *ServerSystemConfig { return &ServerSystemConfig{} })
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 01 22:13:18 UTC 2024 - 8.4K bytes - Viewed (0)