Documentation
¶
Overview ¶
Package tenantctx stores tenant and host-side execution state in context.Context.
Index ¶
- func Detach(ctx context.Context) context.Context
- func FromContext(ctx context.Context) (types.Tenant, bool)
- func IsHost(ctx context.Context) bool
- func Switch(ctx context.Context, tenant types.Tenant) context.Context
- func WithHost(ctx context.Context) context.Context
- func WithTenant(ctx context.Context, tenant types.Tenant) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Detach ¶
Detach returns a context without tenant or host state and without parent cancellation.
func FromContext ¶
FromContext returns the tenant stored in ctx.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.