mirror of
https://github.com/linka-cloud/grpc.git
synced 2024-11-25 04:16:24 +00:00
30 lines
673 B
Go
30 lines
673 B
Go
package recovery
|
|
|
|
import (
|
|
grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type interceptors struct {
|
|
opts grpc_recovery.Option
|
|
}
|
|
|
|
func (i *interceptors) UnaryServerInterceptor() grpc.UnaryServerInterceptor {
|
|
return grpc_recovery.UnaryServerInterceptor(i.opts)
|
|
}
|
|
|
|
func (i *interceptors) StreamServerInterceptor() grpc.StreamServerInterceptor {
|
|
return grpc_recovery.StreamServerInterceptor(i.opts)
|
|
}
|
|
|
|
func (i *interceptors) UnaryClientInterceptor() grpc.UnaryClientInterceptor {
|
|
panic("not implemented")
|
|
}
|
|
|
|
func (i *interceptors) StreamClientInterceptor() grpc.StreamClientInterceptor {
|
|
panic("not implemented")
|
|
}
|
|
|
|
|
|
|