fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

1// Package systemtenant exports UnsafeCtx which allows to access shards across 2// all tenants. This must only be used for tasks that are not request specific. 3package systemtenant 4 5import ( 6 "context" 7) 8 9type contextKey int 10 11const systemTenantKey contextKey = iota 12 13// UnsafeCtx is a context that allows queries across all tenants. Don't use this 14// for user requests. 15var UnsafeCtx = context.WithValue(context.Background(), systemTenantKey, systemTenantKey) 16 17// Is returns true if the context has been marked to allow queries across all 18// tenants. 19func Is(ctx context.Context) bool { 20 _, ok := ctx.Value(systemTenantKey).(contextKey) 21 return ok 22}