interceptors

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

panic.go recovers from panics and converts them into proper gRPC errors instead of crashing the server. the panic errors are converted to INTERNAL_ERROR errors and stack traces are logged.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMacaroon added in v0.8.0

func CheckMacaroon(ctx context.Context, fullMethod string, svc *macaroons.Service) error

func StreamInterceptor

func StreamInterceptor(
	svc *macaroons.Service,
	readiness *ReadinessService,
	serverVersion string,
) grpc.ServerOption

StreamInterceptor returns the stream interceptor with a logrus log. serverVersion is the arkd build version (e.g. "v1.2.3"); only its major component is used for SDK compatibility checks.

func UnaryInterceptor

func UnaryInterceptor(
	svc *macaroons.Service,
	readiness *ReadinessService,
	serverVersion string,
) grpc.ServerOption

UnaryInterceptor returns the unary interceptor. serverVersion is the arkd build version (e.g. "v1.2.3"); only its major component is used for SDK compatibility checks.

Types

type ReadinessService added in v0.9.0

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

func NewReadinessService added in v0.9.0

func NewReadinessService(ctx context.Context) *ReadinessService

func (*ReadinessService) Check added in v0.9.0

func (r *ReadinessService) Check(_ context.Context, fullMethod string) error

func (*ReadinessService) ListenToWalletState added in v0.9.1

func (r *ReadinessService) ListenToWalletState(connect func() <-chan bool)

func (*ReadinessService) MarkAppServiceStarted added in v0.9.0

func (r *ReadinessService) MarkAppServiceStarted()

func (*ReadinessService) MarkAppServiceStopped added in v0.9.0

func (r *ReadinessService) MarkAppServiceStopped()

Jump to

Keyboard shortcuts

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