interceptors

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package interceptors provides the interceptors for RPC.

Index

Constants

View Source
const (
	// SlowThreshold is the threshold for slow RPC.
	SlowThreshold = 100 * gotime.Millisecond
)

Variables

View Source
var ErrUnauthenticated = errors.New("authorization is not provided")

ErrUnauthenticated is returned when authentication is failed.

Functions

This section is empty.

Types

type AdminServiceInterceptor added in v0.4.25

type AdminServiceInterceptor struct {
	// contains filtered or unexported fields
}

AdminServiceInterceptor is an interceptor for building additional context and handling authentication for AdminService.

func NewAdminServiceInterceptor added in v0.4.25

func NewAdminServiceInterceptor(be *backend.Backend, tokenManager *auth.TokenManager) *AdminServiceInterceptor

NewAdminServiceInterceptor creates a new instance of AdminServiceInterceptor.

func (*AdminServiceInterceptor) WrapStreamingClient added in v0.4.25

WrapStreamingClient creates a stream client interceptor for authentication.

func (*AdminServiceInterceptor) WrapStreamingHandler added in v0.4.25

WrapStreamingHandler creates a stream server interceptor for authentication.

func (*AdminServiceInterceptor) WrapUnary added in v0.4.25

WrapUnary creates a unary server interceptor for authentication.

type DefaultInterceptor

type DefaultInterceptor struct{}

DefaultInterceptor is an interceptor for common RPC.

func NewDefaultInterceptor

func NewDefaultInterceptor() *DefaultInterceptor

NewDefaultInterceptor creates a new instance of DefaultInterceptor.

func (*DefaultInterceptor) WrapStreamingClient added in v0.4.11

WrapStreamingClient creates a stream client interceptor for default.

func (*DefaultInterceptor) WrapStreamingHandler added in v0.4.11

WrapStreamingHandler creates a stream server interceptor for default.

func (*DefaultInterceptor) WrapUnary added in v0.4.11

WrapUnary creates a unary server interceptor for default.

type YorkieServiceInterceptor added in v0.4.25

type YorkieServiceInterceptor struct {
	// contains filtered or unexported fields
}

YorkieServiceInterceptor is an interceptor for building additional context and handling authentication for YorkieService.

func NewYorkieServiceInterceptor added in v0.4.25

func NewYorkieServiceInterceptor(be *backend.Backend) *YorkieServiceInterceptor

NewYorkieServiceInterceptor creates a new instance of YorkieServiceInterceptor.

func (*YorkieServiceInterceptor) WrapStreamingClient added in v0.4.25

WrapStreamingClient creates a stream client interceptor for building additional context.

func (*YorkieServiceInterceptor) WrapStreamingHandler added in v0.4.25

WrapStreamingHandler creates a stream server interceptor for building additional context.

func (*YorkieServiceInterceptor) WrapUnary added in v0.4.25

WrapUnary creates a unary server interceptor for building additional context.

Jump to

Keyboard shortcuts

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