Documentation ¶
Overview ¶
Package grpc_scope handles setting and retrieving the store/scope for clients and servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunModeNewOutgoingContext ¶
RunModeNewOutgoingContext use on client side to transmit a store/scope to the server.
func StreamServerInterceptor ¶
func StreamServerInterceptor(sf store.Finder) grpc.StreamServerInterceptor
StreamServerInterceptor returns a new stream server interceptor that performs per-request the store ID and website ID detection by the run mode. Store and website ID gets packed into the context with function scope.WithContext. Which can be later extracted via scope.FromContext. A client must add the run mode to the context via function RunModeNewOutgoingContext.
func UnaryServerInterceptor ¶
func UnaryServerInterceptor(sf store.Finder) grpc.UnaryServerInterceptor
UnaryServerInterceptor returns a new unary server interceptors that performs per-request the store ID and website ID detection by the run mode. Store and website ID gets packed into the context with function scope.WithContext. Which can be later extracted via scope.FromContext. A client must add the run mode to the context via function RunModeNewOutgoingContext.
Types ¶
This section is empty.