-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: log errors context #84
Conversation
// NewSampledExecutionAPI creates a decorated ActionExecutionAPI which | ||
// implements a leaky bucket based on the given interval. | ||
func NewSampledExecutionAPI(api auth0.ActionExecutionAPI, interval time.Duration) auth0.ActionExecutionAPI { | ||
return &sampledExecutionAPI{ | ||
api: api, | ||
interval: interval, | ||
timer: time.NewTimer(0), | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is likely a key pattern we can utilize for cases where we need to N+1
a query. For this particular case, actions execution information needs to be fetched as a separate API call since the log only contains the execution ID.
|
||
} | ||
|
||
func (r *Renderer) Stream(data []View, ch <-chan View) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stream is now completely separate and will simply display rows in "tab separated" format"
fmt.Fprintf(w, fmtStr, args...) | ||
} | ||
|
||
func writeTable(w io.Writer, header []string, data [][]string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
writeTable
is back to its original form, without streaming concerns. (Thank god! :)
LGTM, but I can't approve this since I'm the owner of the PR |
Changes
Extras() []string
concept which aView
can optionally implement.Stream
implementation).