datalayer

package
v1.49.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package datalayer defines middleware that injects the datalayer into the context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) datalayer.DataLayer

FromContext reads the selected DataLayer out of a context.Context and returns nil if it does not exist.

func MustFromContext

func MustFromContext(ctx context.Context) datalayer.DataLayer

MustFromContext reads the selected DataLayer out of a context.Context, computes a zedtoken from it, and panics if it has not been set on the context.

func StreamCountingInterceptor

func StreamCountingInterceptor() grpc.StreamServerInterceptor

StreamCountingInterceptor wraps the datalayer with a counting proxy for stream requests. After each stream completes, it exports the method call counts to Prometheus metrics.

func UnaryCountingInterceptor

func UnaryCountingInterceptor() grpc.UnaryServerInterceptor

UnaryCountingInterceptor wraps the datalayer with a counting proxy for unary requests. After each request completes, it exports the method call counts to Prometheus metrics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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