github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/pkg/middleware/usagemetrics/usagemetrics.go (about)

     1  package usagemetrics
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/authzed/spicedb/internal/middleware/usagemetrics"
     7  	dispatch "github.com/authzed/spicedb/pkg/proto/dispatch/v1"
     8  )
     9  
    10  // FromContext returns any metadata that was stored in the context.
    11  func FromContext(ctx context.Context) *dispatch.ResponseMeta {
    12  	return usagemetrics.FromContext(ctx)
    13  }