server

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthInterceptor

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

AuthInterceptor validates JWT tokens from other nodes

func NewAuthInterceptor

func NewAuthInterceptor(verifier authn.JWTVerifier, logger *zap.Logger) *AuthInterceptor

func (*AuthInterceptor) Stream

Stream returns a grpc.StreamServerInterceptor that validates JWT tokens

func (*AuthInterceptor) Unary

Unary returns a grpc.UnaryServerInterceptor that validates JWT tokens

type LoggingInterceptor

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

LoggingInterceptor logs errors for unary and stream RPCs.

func NewLoggingInterceptor

func NewLoggingInterceptor(logger *zap.Logger) (*LoggingInterceptor, error)

NewLoggingInterceptor creates a new instance of LoggingInterceptor.

func (*LoggingInterceptor) Stream

Stream intercepts stream RPC calls to log errors.

func (*LoggingInterceptor) Unary

Unary intercepts unary RPC calls to log errors.

Jump to

Keyboard shortcuts

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