MCPcopy Create free account
hub / github.com/bytecodealliance/wrpc / Serve

Method Serve

go/wrpc.go:27–27  ·  view source on GitHub ↗

Serve serves a function `name` within an instance `instance`. `paths` define the async parameter paths to subscribe on. `Serve` will call `f` with two handles used for writing and reading encoded results and parameters respectively. On success, `Serve` returns a function, which can be called to stop

(instance string, name string, f HandleFunc, paths ...SubscribePath)

Source from the content-addressed store, hash-verified

25 // `Serve` will call `f` with two handles used for writing and reading encoded results and parameters respectively.
26 // On success, `Serve` returns a function, which can be called to stop serving.
27 Serve(instance string, name string, f HandleFunc, paths ...SubscribePath) (func() error, error)
28}
29
30// Own is an owned resource handle

Callers 15

ServeMethod · 0.65
TestAsyncFunction · 0.65
TestResourcesFunction · 0.65
TestSyncFunction · 0.65
runFunction · 0.65
runFunction · 0.65
runFunction · 0.65
runFunction · 0.65
ServeInterfaceFunction · 0.65
runFunction · 0.65
runFunction · 0.65
ServeInterfaceFunction · 0.65

Implementers 3

FramedServergo/frame_server.go
Servergo/x/tcp/server.go
Clientgo/nats/client.go

Calls

no outgoing calls

Tested by 3

TestAsyncFunction · 0.52
TestResourcesFunction · 0.52
TestSyncFunction · 0.52