github.com/torfuzx/docker@v1.8.1/pkg/proxy/stub_proxy.go (about)

     1  package proxy
     2  
     3  import (
     4  	"net"
     5  )
     6  
     7  type StubProxy struct {
     8  	frontendAddr net.Addr
     9  	backendAddr  net.Addr
    10  }
    11  
    12  func (p *StubProxy) Run()                   {}
    13  func (p *StubProxy) Close()                 {}
    14  func (p *StubProxy) FrontendAddr() net.Addr { return p.frontendAddr }
    15  func (p *StubProxy) BackendAddr() net.Addr  { return p.backendAddr }
    16  
    17  func NewStubProxy(frontendAddr, backendAddr net.Addr) (Proxy, error) {
    18  	return &StubProxy{
    19  		frontendAddr: frontendAddr,
    20  		backendAddr:  backendAddr,
    21  	}, nil
    22  }