Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: replace funcs with the builtin #6062

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions internal/envoy/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ func truncate(l int, s, suffix string) string {
return s[:l-len(suffix)-1] + "-" + suffix
}

func min(a, b int) int {
if a > b {
return b
}
return a
}

// AnyPositive indicates if any of the values provided are greater than zero.
func AnyPositive(first uint32, rest ...uint32) bool {
if first > 0 {
Expand Down
14 changes: 0 additions & 14 deletions internal/xdscache/v3/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,20 +365,6 @@ func (c *ListenerCache) OnChange(root *dag.DAG) {
cfg := c.Config
listeners := map[string]*envoy_listener_v3.Listener{}

max := func(a, b envoy_tls_v3.TlsParameters_TlsProtocol) envoy_tls_v3.TlsParameters_TlsProtocol {
if a > b {
return a
}
return b
}

min := func(a, b envoy_tls_v3.TlsParameters_TlsProtocol) envoy_tls_v3.TlsParameters_TlsProtocol {
if a < b {
return a
}
return b
}

socketOptions := envoy_v3.NewSocketOptions().TCPKeepalive()
if cfg.SocketOptions != nil {
socketOptions = socketOptions.TOS(cfg.SocketOptions.TOS).TrafficClass(cfg.SocketOptions.TrafficClass)
Expand Down
Loading