mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-10-06 06:19:08 +00:00
18 lines
497 B
Go
18 lines
497 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.debros.io/DeBros/network/pkg/pubsub"
|
|
"git.debros.io/DeBros/network/pkg/storage"
|
|
)
|
|
|
|
// WithNamespace applies both storage and pubsub namespace overrides to the context.
|
|
// It is a convenience helper for client callers to ensure both subsystems receive
|
|
// the same, consistent namespace override.
|
|
func WithNamespace(ctx context.Context, ns string) context.Context {
|
|
ctx = storage.WithNamespace(ctx, ns)
|
|
ctx = pubsub.WithNamespace(ctx, ns)
|
|
return ctx
|
|
}
|