@@ -66,7 +66,7 @@ func NewDirectorWithConfig(datastore Datastore, scheduler Scheduler, saturationD
66
66
scheduler : scheduler ,
67
67
saturationDetector : saturationDetector ,
68
68
preRequestPlugins : config .preRequestPlugins ,
69
- postResponseRecievedPlugins : config .postResponseRecievedPlugins ,
69
+ postResponseReceivedPlugins : config .postResponseReceivedPlugins ,
70
70
postResponseStreamingPlugins : config .postResponseStreamingPlugins ,
71
71
postResponseCompletePlugins : config .postResponseCompletePlugins ,
72
72
defaultPriority : 0 , // define default priority explicitly
@@ -79,7 +79,7 @@ type Director struct {
79
79
scheduler Scheduler
80
80
saturationDetector SaturationDetector
81
81
preRequestPlugins []PreRequest
82
- postResponseRecievedPlugins []PostResponseRecieved
82
+ postResponseReceivedPlugins []PostResponseReceived
83
83
postResponseStreamingPlugins []PostResponseStreaming
84
84
postResponseCompletePlugins []PostResponseComplete
85
85
// we just need a pointer to an int variable since priority is a pointer in InferenceObjective
@@ -282,16 +282,16 @@ func (d *Director) toSchedulerPodMetrics(pods []backendmetrics.PodMetrics) []sch
282
282
return pm
283
283
}
284
284
285
- // HandleResponseRecieved is called when the first chunk of the response arrives.
286
- func (d * Director ) HandleResponseRecieved (ctx context.Context , reqCtx * handlers.RequestContext ) (* handlers.RequestContext , error ) {
285
+ // HandleResponseReceived is called when the first chunk of the response arrives.
286
+ func (d * Director ) HandleResponseReceived (ctx context.Context , reqCtx * handlers.RequestContext ) (* handlers.RequestContext , error ) {
287
287
response := & Response {
288
288
RequestId : reqCtx .Request .Headers [requtil .RequestIdHeaderKey ],
289
289
Headers : reqCtx .Response .Headers ,
290
290
}
291
291
292
292
// TODO: to extend fallback functionality, handle cases where target pod is unavailable
293
293
// https://github.com/kubernetes-sigs/gateway-api-inference-extension/issues/1224
294
- d .runPostResponseRecievedPlugins (ctx , reqCtx .SchedulingRequest , response , reqCtx .TargetPod )
294
+ d .runPostResponseReceivedPlugins (ctx , reqCtx .SchedulingRequest , response , reqCtx .TargetPod )
295
295
296
296
return reqCtx , nil
297
297
}
@@ -347,13 +347,13 @@ func (d *Director) runPreRequestPlugins(ctx context.Context, request *scheduling
347
347
}
348
348
}
349
349
350
- func (d * Director ) runPostResponseRecievedPlugins (ctx context.Context , request * schedulingtypes.LLMRequest , response * Response , targetPod * backend.Pod ) {
350
+ func (d * Director ) runPostResponseReceivedPlugins (ctx context.Context , request * schedulingtypes.LLMRequest , response * Response , targetPod * backend.Pod ) {
351
351
loggerDebug := log .FromContext (ctx ).V (logutil .DEBUG )
352
- for _ , plugin := range d .postResponseRecievedPlugins {
352
+ for _ , plugin := range d .postResponseReceivedPlugins {
353
353
loggerDebug .Info ("Running post-response plugin" , "plugin" , plugin .TypedName ())
354
354
before := time .Now ()
355
- plugin .PostResponseRecieved (ctx , request , response , targetPod )
356
- metrics .RecordPluginProcessingLatency (PostResponseRecievedExtensionPoint , plugin .TypedName ().Type , plugin .TypedName ().Name , time .Since (before ))
355
+ plugin .PostResponseReceived (ctx , request , response , targetPod )
356
+ metrics .RecordPluginProcessingLatency (PostResponseReceivedExtensionPoint , plugin .TypedName ().Type , plugin .TypedName ().Name , time .Since (before ))
357
357
loggerDebug .Info ("Completed running post-response plugin successfully" , "plugin" , plugin .TypedName ())
358
358
}
359
359
}
0 commit comments