mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
* Rename arkd folder & drop cli * Rename ark cli folder & update docs * Update readme * Fix * scripts: add build-all * Add target to build cli for all platforms * Update build scripts --------- Co-authored-by: tiero <3596602+tiero@users.noreply.github.com>
17 lines
480 B
Go
17 lines
480 B
Go
package interceptors
|
|
|
|
import (
|
|
middleware "github.com/grpc-ecosystem/go-grpc-middleware"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
// UnaryInterceptor returns the unary interceptor
|
|
func UnaryInterceptor() grpc.ServerOption {
|
|
return grpc.UnaryInterceptor(middleware.ChainUnaryServer(unaryLogger))
|
|
}
|
|
|
|
// StreamInterceptor returns the stream interceptor with a logrus log
|
|
func StreamInterceptor() grpc.ServerOption {
|
|
return grpc.StreamInterceptor(middleware.ChainStreamServer(streamLogger))
|
|
}
|