MCPcopy
hub / github.com/google/seesaw / OverrideBackend

Method OverrideBackend

engine/ipc.go:388–407  ·  view source on GitHub ↗

OverrideBackend passes a BackendOverride to the engine.

(args *ipc.Override, reply *int)

Source from the content-addressed store, hash-verified

386
387// OverrideBackend passes a BackendOverride to the engine.
388func (s *SeesawEngine) OverrideBackend(args *ipc.Override, reply *int) error {
389 if args == nil {
390 return errors.New("args is nil")
391 }
392 ctx := args.Ctx
393 s.trace("OverrideBackend", ctx)
394 if ctx == nil {
395 return errContext
396 }
397
398 if !ctx.CanWrite() {
399 return errAccess
400 }
401
402 if args.Backend == nil {
403 return errors.New("backend is nil")
404 }
405 s.engine.queueOverride(args.Backend)
406 return nil
407}
408
409// OverrideDestination passes a DestinationOverride to the engine.
410func (s *SeesawEngine) OverrideDestination(args *ipc.Override, reply *int) error {

Callers

nothing calls this directly

Calls 3

traceMethod · 0.95
CanWriteMethod · 0.80
queueOverrideMethod · 0.45

Tested by

no test coverage detected