This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the envoy proxy snapshot cache
This alleviates our need to handle the envoy state machine, and know how to respond to envoy requests. Instead, we can simply populate the values for each proxy (keyed by the NodeID, which is set to the proxy's UUID) and let the snapshot cache handle all communication with the proxy. Signed-off-by: Sean Teeling <[email protected]>
- Loading branch information
Showing
35 changed files
with
428 additions
and
1,552 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
package ads | ||
|
||
import ( | ||
"github.com/rs/zerolog" | ||
) | ||
|
||
// scLogger implements envoy control plane's log.Logger and delegates calls to the `log` variable defined in | ||
// types.go. It is used for the envoy snapshot cache. | ||
type scLogger struct{} | ||
type scLogger struct { | ||
log zerolog.Logger | ||
} | ||
|
||
// Debugf logs a formatted debugging message. | ||
func (l *scLogger) Debugf(format string, args ...interface{}) { | ||
log.Debug().Msgf(format, args...) | ||
l.log.Debug().Msgf(format, args...) | ||
} | ||
|
||
// Infof logs a formatted informational message. | ||
func (l *scLogger) Infof(format string, args ...interface{}) { | ||
log.Info().Msgf(format, args...) | ||
l.log.Info().Msgf(format, args...) | ||
} | ||
|
||
// Warnf logs a formatted warning message. | ||
func (l *scLogger) Warnf(format string, args ...interface{}) { | ||
log.Warn().Msgf(format, args...) | ||
l.log.Warn().Msgf(format, args...) | ||
} | ||
|
||
// Errorf logs a formatted error message. | ||
func (l *scLogger) Errorf(format string, args ...interface{}) { | ||
log.Error().Msgf(format, args...) | ||
l.log.Error().Msgf(format, args...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.