MCPcopy Create free account
hub / github.com/InferCore/InferCore / Invoke

Method Invoke

internal/server/server_test.go:923–934  ·  view source on GitHub ↗
(ctx context.Context, req types.BackendRequest)

Source from the content-addressed store, hash-verified

921func (b *blockingInferAdapter) Name() string { return b.name }
922
923func (b *blockingInferAdapter) Invoke(ctx context.Context, req types.BackendRequest) (types.BackendResponse, error) {
924 b.once.Do(func() { close(b.started) })
925 select {
926 case <-b.release:
927 case <-ctx.Done():
928 return types.BackendResponse{}, ctx.Err()
929 }
930 return types.BackendResponse{
931 Output: map[string]any{"text": "ok", "backend": b.name},
932 Timing: &types.BackendTiming{TTFTMs: 1, CompletionLatencyMs: 2},
933 }, nil
934}
935
936func (b *blockingInferAdapter) Health(context.Context) error { return nil }
937

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected