middleware

package
v1.43.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package middleware defines various custom middlewares.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainStreamServer

func ChainStreamServer(interceptors ...grpc.StreamServerInterceptor) grpc.StreamServerInterceptor

ChainStreamServer creates a single interceptor out of a chain of many interceptors.

Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three. If you want to pass context between interceptors, use WrapServerStream.

func ChainUnaryServer

func ChainUnaryServer(interceptors ...grpc.UnaryServerInterceptor) grpc.UnaryServerInterceptor

ChainUnaryServer creates a single interceptor out of a chain of many interceptors.

Execution is done in left-to-right order, including passing of context. For example ChainUnaryServer(one, two, three) will execute one before two before three, and three will see context changes of one and two.

Types

This section is empty.

Directories

Path Synopsis
Package datastore defines middleware that injects the datastore into the context.
Package datastore defines middleware that injects the datastore into the context.
Package dispatcher defines middleware that injects the dispatcher into the context.
Package dispatcher defines middleware that injects the dispatcher into the context.
Package handwrittenvalidation defines middleware that runs custom-made validations on incoming requests.
Package handwrittenvalidation defines middleware that runs custom-made validations on incoming requests.
Package pertoken defines middleware for testing purposes that injects a new in-memory datastore per incoming bearer token.
Package pertoken defines middleware for testing purposes that injects a new in-memory datastore per incoming bearer token.
Package readonly defines middleware that injects a read-only proxy of the datastore into the context.
Package readonly defines middleware that injects a read-only proxy of the datastore into the context.
Package servicespecific defines middleware that injects other middlewares.
Package servicespecific defines middleware that injects other middlewares.
Package streamtimeout defines middleware that cancels the context after a timeout if no new data has been received.
Package streamtimeout defines middleware that cancels the context after a timeout if no new data has been received.
Package usagemetrics defines middleware that adds usage data (e.g.
Package usagemetrics defines middleware that adds usage data (e.g.

Jump to

Keyboard shortcuts

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