chore: remove simple methods, inlined (#2768)
parent
26c541b9cb
commit
0c786ca849
@ -1,13 +0,0 @@
|
||||
package internal
|
||||
|
||||
import "google.golang.org/grpc"
|
||||
|
||||
// WithStreamClientInterceptors uses given client stream interceptors.
|
||||
func WithStreamClientInterceptors(interceptors ...grpc.StreamClientInterceptor) grpc.DialOption {
|
||||
return grpc.WithChainStreamInterceptor(interceptors...)
|
||||
}
|
||||
|
||||
// WithUnaryClientInterceptors uses given client unary interceptors.
|
||||
func WithUnaryClientInterceptors(interceptors ...grpc.UnaryClientInterceptor) grpc.DialOption {
|
||||
return grpc.WithChainUnaryInterceptor(interceptors...)
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestWithStreamClientInterceptors(t *testing.T) {
|
||||
opts := WithStreamClientInterceptors()
|
||||
assert.NotNil(t, opts)
|
||||
}
|
||||
|
||||
func TestWithUnaryClientInterceptors(t *testing.T) {
|
||||
opts := WithUnaryClientInterceptors()
|
||||
assert.NotNil(t, opts)
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package internal
|
||||
|
||||
import "google.golang.org/grpc"
|
||||
|
||||
// WithStreamServerInterceptors uses given server stream interceptors.
|
||||
func WithStreamServerInterceptors(interceptors ...grpc.StreamServerInterceptor) grpc.ServerOption {
|
||||
return grpc.ChainStreamInterceptor(interceptors...)
|
||||
}
|
||||
|
||||
// WithUnaryServerInterceptors uses given server unary interceptors.
|
||||
func WithUnaryServerInterceptors(interceptors ...grpc.UnaryServerInterceptor) grpc.ServerOption {
|
||||
return grpc.ChainUnaryInterceptor(interceptors...)
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestWithStreamServerInterceptors(t *testing.T) {
|
||||
opts := WithStreamServerInterceptors()
|
||||
assert.NotNil(t, opts)
|
||||
}
|
||||
|
||||
func TestWithUnaryServerInterceptors(t *testing.T) {
|
||||
opts := WithUnaryServerInterceptors()
|
||||
assert.NotNil(t, opts)
|
||||
}
|
Loading…
Reference in New Issue