stillbox/pkg/gordio/server/ingest.go

17 lines
368 B
Go
Raw Normal View History

2024-08-01 01:01:08 -04:00
package server
import (
"context"
"dynatron.me/x/stillbox/pkg/gordio/calls"
"dynatron.me/x/stillbox/pkg/gordio/database"
)
func (s *Server) Ingest(ctx context.Context, call *calls.Call) {
// decouple this context from the one we call sinks with
db := database.FromCtx(ctx)
nctx := database.CtxWithDB(context.Background(), db)
s.sinks.EmitCall(nctx, call)
}