MCPcopy Index your code
hub / github.com/apache/answer / NewService

Function NewService

internal/service/vector_sync/vector_sync.go:51–57  ·  view source on GitHub ↗
(data *data.Data)

Source from the content-addressed store, hash-verified

49type Service queue.Service[*Task]
50
51func NewService(data *data.Data) Service {
52 q := queue.New[*Task]("vector_sync", 128)
53 q.RegisterHandler(func(ctx context.Context, msg *Task) error {
54 return handle(ctx, data, msg)
55 })
56 return q
57}
58
59func handle(ctx context.Context, data *data.Data, msg *Task) error {
60 if msg == nil || msg.ObjectID == "" {

Callers 1

initApplicationFunction · 0.92

Calls 2

handleFunction · 0.70
RegisterHandlerMethod · 0.65

Tested by

no test coverage detected