Skip to content

Commit

Permalink
Remove LatencyAccept of the reverse proxy from the e2e test
Browse files Browse the repository at this point in the history
Part of the patches to fix etcd-io#17737

During the development of etcd-io#17938,
we agreed that during the transition to L7 forward proxy, unused
features and features targeting L4 reverse proxy will be dropped.

This feature falls under the unused feature.

Signed-off-by: Chun-Hung Tseng <[email protected]>
  • Loading branch information
henrybear327 committed Sep 25, 2024
1 parent 8bf4687 commit e3aa107
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions pkg/proxy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ type Server interface {
// Close closes listener and transport.
Close() error

LatencyAccept() time.Duration

// DelayTx adds latency ± random variable for "outgoing" traffic
// in "sending" layer.
DelayTx(latency, rv time.Duration)
Expand Down Expand Up @@ -142,9 +140,6 @@ type server struct {
listenerMu sync.RWMutex
listener net.Listener

latencyAcceptMu sync.RWMutex
latencyAccept time.Duration

modifyTxMu sync.RWMutex
modifyTx func(data []byte) []byte

Expand Down Expand Up @@ -263,17 +258,6 @@ func (s *server) listenAndServe() {
close(s.readyc)

for {
s.latencyAcceptMu.RLock()
lat := s.latencyAccept
s.latencyAcceptMu.RUnlock()
if lat > 0 {
select {
case <-time.After(lat):
case <-s.donec:
return
}
}

s.listenerMu.RLock()
ln := s.listener
s.listenerMu.RUnlock()
Expand Down Expand Up @@ -609,13 +593,6 @@ func (s *server) Close() (err error) {
return err
}

func (s *server) LatencyAccept() time.Duration {
s.latencyAcceptMu.RLock()
d := s.latencyAccept
s.latencyAcceptMu.RUnlock()
return d
}

func (s *server) DelayTx(latency, rv time.Duration) {
if latency <= 0 {
return
Expand Down

0 comments on commit e3aa107

Please sign in to comment.