-
Notifications
You must be signed in to change notification settings - Fork 349
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
Feature #18 add x flow #23
Conversation
@@ -14,6 +15,10 @@ import ( | |||
"github.com/zalando/skipper/skipper" | |||
) | |||
|
|||
var ( |
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.
no need for the braces when there is only a single var, but of course fine like this, too
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.
I believe we can add some more global errors soon :)
func (this *flowId) MakeFilter(id string, fc skipper.FilterConfig) (skipper.Filter, error) { | ||
var reuseExisting bool | ||
if len(fc) > 0 { | ||
if r, ok := fc[0].(bool); ok { |
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.
we don't have bool :(
the doc is not yet in the master, but you can have a look at here:
https://github.com/zalando/skipper/blob/release-cleanup-doc/eskip/doc.go
Have you considered just having an array of valid chars and then |
Pre-defining an alphabet seems like a good idea. I'm sure it will be faster and, you're right, for this we don't need crypto-randomness. |
|
lgtm, very nice |
@@ -28,6 +29,7 @@ func Register(registry skipper.FilterRegistry) { | |||
static.Make(), | |||
stripquery.Make(), | |||
&redirect.Redirect{}, | |||
flowid.New(), |
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.
new instead of make? shouldn't we be consistent with naming?
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.
Yes, we should. It will be New*(). Refactoring the old filters will be next
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.
it's already in progress to switch to new, see the release-cleanup branch
lgtm |
The implementation generates a random string with 8 to 64 bytes and sets a HTTP header
X-Flow-Id
that other systems can use to correlate log entries.The filter accepts some parameters that help control the its behavior, namely, to accept an existing flow id and the length of the generated flow ids
This closes #18