@@ -66,7 +66,7 @@ func NewDirectorWithConfig(datastore Datastore, scheduler Scheduler, saturationD
6666 scheduler : scheduler ,
6767 saturationDetector : saturationDetector ,
6868 preRequestPlugins : config .preRequestPlugins ,
69- postResponseRecievedPlugins : config .postResponseRecievedPlugins ,
69+ postResponseReceivedPlugins : config .postResponseReceivedPlugins ,
7070 postResponseStreamingPlugins : config .postResponseStreamingPlugins ,
7171 postResponseCompletePlugins : config .postResponseCompletePlugins ,
7272 defaultPriority : 0 , // define default priority explicitly
@@ -79,7 +79,7 @@ type Director struct {
7979 scheduler Scheduler
8080 saturationDetector SaturationDetector
8181 preRequestPlugins []PreRequest
82- postResponseRecievedPlugins []PostResponseRecieved
82+ postResponseReceivedPlugins []PostResponseReceived
8383 postResponseStreamingPlugins []PostResponseStreaming
8484 postResponseCompletePlugins []PostResponseComplete
8585 // 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
282282 return pm
283283}
284284
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 ) {
287287 response := & Response {
288288 RequestId : reqCtx .Request .Headers [requtil .RequestIdHeaderKey ],
289289 Headers : reqCtx .Response .Headers ,
290290 }
291291
292292 // TODO: to extend fallback functionality, handle cases where target pod is unavailable
293293 // 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 )
295295
296296 return reqCtx , nil
297297}
@@ -347,13 +347,13 @@ func (d *Director) runPreRequestPlugins(ctx context.Context, request *scheduling
347347 }
348348}
349349
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 ) {
351351 loggerDebug := log .FromContext (ctx ).V (logutil .DEBUG )
352- for _ , plugin := range d .postResponseRecievedPlugins {
352+ for _ , plugin := range d .postResponseReceivedPlugins {
353353 loggerDebug .Info ("Running post-response plugin" , "plugin" , plugin .TypedName ())
354354 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 ))
357357 loggerDebug .Info ("Completed running post-response plugin successfully" , "plugin" , plugin .TypedName ())
358358 }
359359}
0 commit comments