Skip to content

Commit

Permalink
rename DBBacked() and remove util/dataplane package
Browse files Browse the repository at this point in the history
  • Loading branch information
randmonkey committed Nov 8, 2023
1 parent 687e05e commit f0a811c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 46 deletions.
4 changes: 2 additions & 2 deletions internal/dataplane/config/dbmode.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func (m DBMode) IsDBLessMode() bool {
return m == "" || m == DBModeOff
}

// DBBacked returns true if the gateway is DB backed.
// IsDBBacked returns true if the gateway is DB backed.
// reverse of IsDBLessMode for readability.
func (m DBMode) DBBacked() bool {
func (m DBMode) IsDBBacked() bool {
return !m.IsDBLessMode()
}
2 changes: 1 addition & 1 deletion internal/dataplane/kong_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ func (c *KongClient) sendOutToGatewayClients(
// since only ONE gateway client is chosen to send requests and store SHA of latest configurations,
// we should propagate the SHA from the chosen client to other clients
// as well as they will pick the configuration from the shared database.
if c.dbmode.DBBacked() &&
if c.dbmode.IsDBBacked() &&
len(gatewayClients) > 1 {
for _, client := range gatewayClients {
client.SetLastConfigSHA([]byte(shas[0]))
Expand Down
43 changes: 0 additions & 43 deletions internal/util/dataplane/mode.go

This file was deleted.

0 comments on commit f0a811c

Please sign in to comment.