github.com/cilium/cilium@v1.16.2/pkg/fqdn/dnsproxy/noop_sessionudpfactory.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Cilium
     3  
     4  package dnsproxy
     5  
     6  import (
     7  	"net"
     8  
     9  	"github.com/cilium/dns"
    10  )
    11  
    12  type noopSessionUDPFactory struct{}
    13  
    14  var _ dns.SessionUDPFactory = &noopSessionUDPFactory{}
    15  
    16  func (*noopSessionUDPFactory) InitPool(msgSize int) {}
    17  
    18  func (*noopSessionUDPFactory) ReadRequest(conn *net.UDPConn) ([]byte, dns.SessionUDP, error) {
    19  	return nil, nil, nil
    20  }
    21  
    22  func (*noopSessionUDPFactory) ReadRequestConn(conn net.PacketConn) ([]byte, net.Addr, error) {
    23  	return nil, nil, nil
    24  }
    25  
    26  func (*noopSessionUDPFactory) SetSocketOptions(conn *net.UDPConn) error {
    27  	return nil
    28  }