ConnectionEvictingClient wraps a grpc.Backend. When any inference method fails with a connection error (server unreachable), it calls the evict callback to remove the model from the ModelLoader's cache. The error is still returned to the caller — the NEXT request will trigger rescheduling via SmartR
| 16 | // still returned to the caller — the NEXT request will trigger rescheduling |
| 17 | // via SmartRouter. |
| 18 | type ConnectionEvictingClient struct { |
| 19 | grpc.Backend |
| 20 | modelID string |
| 21 | evict func() |
| 22 | once sync.Once |
| 23 | } |
| 24 | |
| 25 | func newConnectionEvictingClient(inner grpc.Backend, modelID string, evict func()) grpc.Backend { |
| 26 | return &ConnectionEvictingClient{ |
nothing calls this directly
no outgoing calls
no test coverage detected