grpc_scope

package
v0.0.0-...-02de949 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2021 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func RunModeNewOutgoingContext(ctx context.Context, runMode scope.TypeID) context.Context

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL