mirror of
https://github.com/linka-cloud/grpc.git
synced 2026-01-25 11:05:05 +00:00
feat(pipe): use wireguard-go pipe implementation until CL299009 is resolved
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -139,7 +139,8 @@ func newService(opts ...Option) (*service, error) {
|
||||
grpc.StreamInterceptor(si),
|
||||
grpc.UnaryInterceptor(ui),
|
||||
}
|
||||
if _, ok := s.opts.lis.(*net.UnixListener); ok || strings.HasPrefix(s.opts.address, "unix://") || strings.HasPrefix(s.opts.address, `\\.\pipe\`) {
|
||||
if (s.opts.lis != nil && (s.opts.lis.Addr().Network() == "unix" || s.opts.lis.Addr().Network() == "pipe")) ||
|
||||
strings.HasPrefix(s.opts.address, "unix://") || strings.HasPrefix(s.opts.address, `\\.\pipe\`) {
|
||||
gopts = append(gopts, grpc.Creds(peercreds.New()))
|
||||
}
|
||||
s.server = grpc.NewServer(append(gopts, s.opts.serverOpts...)...)
|
||||
|
||||
Reference in New Issue
Block a user