MCPcopy Index your code
hub / github.com/InferCore/InferCore / updateLedgerPolicy

Method updateLedgerPolicy

internal/server/server.go:470–480  ·  view source on GitHub ↗
(ctx context.Context, requestID string, snap []byte, routeReason, backend *string)

Source from the content-addressed store, hash-verified

468}
469
470func (s *Server) updateLedgerPolicy(ctx context.Context, requestID string, snap []byte, routeReason, backend *string) {
471 if s.ledger == nil {
472 return
473 }
474 _ = s.ledger.UpdateRequest(ctx, requestID, requests.RequestPatch{
475 PolicySnapshot: snap,
476 RouteReason: routeReason,
477 SelectedBackend: backend,
478 UpdatedAt: time.Now(),
479 })
480}
481
482func (s *Server) markLedgerSuccess(ctx context.Context, requestID, backend, routeReason string) {
483 if s.ledger == nil {

Callers 1

UpdatePolicyMethod · 0.80

Calls 1

UpdateRequestMethod · 0.65

Tested by

no test coverage detected