EXPERIMENTAL: SendMessage sends a message to the worker and waits for a response.
(ctx context.Context, message any, rw http.ResponseWriter)
| 45 | |
| 46 | // EXPERIMENTAL: SendMessage sends a message to the worker and waits for a response. |
| 47 | func (w *extensionWorkers) SendMessage(ctx context.Context, message any, rw http.ResponseWriter) (any, error) { |
| 48 | fc := newFrankenPHPContext() |
| 49 | fc.logger = globalLogger |
| 50 | fc.worker = w.internalWorker |
| 51 | fc.responseWriter = rw |
| 52 | fc.handlerParameters = message |
| 53 | |
| 54 | err := w.internalWorker.handleRequest(contextHolder{context.WithValue(ctx, contextKey, fc), fc}) |
| 55 | |
| 56 | return fc.handlerReturn, err |
| 57 | } |
nothing calls this directly
no test coverage detected