interceptor

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLConfig added in v0.1.13

type ACLConfig interface {
	AllowedNamespaces() []string
	AdminServiceAllowedMethods() []string
}

type AccessControlInterceptor

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

func NewAccessControlInterceptor

func NewAccessControlInterceptor(
	logger log.Logger,
	adminServiceAllowedMethods []string,
	allowedNamespaces []string,
) *AccessControlInterceptor

func (*AccessControlInterceptor) Intercept

func (i *AccessControlInterceptor) Intercept(
	ctx context.Context,
	req any,
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (any, error)

func (*AccessControlInterceptor) StreamIntercept

func (i *AccessControlInterceptor) StreamIntercept(
	service interface{},
	serverStream grpc.ServerStream,
	info *grpc.StreamServerInfo,
	handler grpc.StreamHandler,
) error

type TranslationInterceptor added in v0.1.4

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

func NewTranslationInterceptor added in v0.1.4

func NewTranslationInterceptor(
	logger log.Logger,
	translators []Translator,
) *TranslationInterceptor

func (*TranslationInterceptor) Intercept added in v0.1.4

func (i *TranslationInterceptor) Intercept(
	ctx context.Context,
	req any,
	info *grpc.UnaryServerInfo,
	handler grpc.UnaryHandler,
) (any, error)

func (*TranslationInterceptor) InterceptStream added in v0.1.4

func (i *TranslationInterceptor) InterceptStream(
	srv any,
	ss grpc.ServerStream,
	info *grpc.StreamServerInfo,
	handler grpc.StreamHandler,
) error

type Translator added in v0.1.4

type Translator interface {
	MatchMethod(string) bool
	TranslateRequest(any) (bool, error)
	TranslateResponse(any) (bool, error)
	Kind() string
}

func NewNamespaceNameTranslator

func NewNamespaceNameTranslator(logger log.Logger, reqMap, respMap map[string]string) Translator

func NewSearchAttributeTranslator added in v0.1.4

func NewSearchAttributeTranslator(logger log.Logger, reqMap, respMap map[string]map[string]string) Translator

Jump to

Keyboard shortcuts

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