MCPcopy Index your code
hub / github.com/php/frankenphp / Workers

Interface Workers

workerextension.go:9–17  ·  view source on GitHub ↗

EXPERIMENTAL: Workers allows you to register a worker.

Source from the content-addressed store, hash-verified

7
8// EXPERIMENTAL: Workers allows you to register a worker.
9type Workers interface {
10 // SendRequest calls the closure passed to frankenphp_handle_request() and updates the PHP context .
11 // The generated HTTP response will be written through the provided writer.
12 SendRequest(rw http.ResponseWriter, r *http.Request) error
13 // SendMessage calls the closure passed to frankenphp_handle_request(), passes message as a parameter, and returns the value produced by the closure.
14 SendMessage(ctx context.Context, message any, rw http.ResponseWriter) (any, error)
15 // NumThreads returns the number of available threads.
16 NumThreads() int
17}
18
19type extensionWorkers struct {
20 name string

Callers 3

TestWorkersExtensionFunction · 0.65
TestWorkersExtensionFunction · 0.65

Implementers 1

extensionWorkersworkerextension.go

Calls

no outgoing calls

Tested by

no test coverage detected