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

xds: implement RouteAction timeout support #4116

Merged
merged 4 commits into from Dec 17, 2020
Merged

Conversation

dfawley
Copy link
Member

@dfawley dfawley commented Dec 16, 2020

This is missing one last piece from A31: reading the HTTP connection manager default max_stream_duration. I'll add that in a follow-on PR.

@dfawley dfawley added the Type: Feature New features or improvements in behavior label Dec 16, 2020
@dfawley dfawley added this to the 1.35 Release milestone Dec 16, 2020
xds/internal/client/client.go Show resolved Hide resolved
}

func (r route) String() string {
return r.m.String() + "->" + fmt.Sprint(r.action)
return r.m.String() + "->" + fmt.Sprint(r.clusters)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also print the duration? Will be hard to format though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I thought about this earlier but forgot to do it.

I think the formatting looks good:

pathPrefix:/foo -> { clusters: [{A 1}], maxStreamDuration: 5s }

pathPrefix: -> { clusters: [{cluster_1 75} {cluster_2 25}], maxStreamDuration: 0s }

I needed to go into the WRRs to add String methods to clean this up (I broke the formatting in my previous PR since it was a map and became a WRR instance).

}

func (r route) String() string {
return r.m.String() + "->" + fmt.Sprint(r.action)
return fmt.Sprintf("%s -> { clusters: %v, maxStreamDuration: %v }", r.m.String(), r.clusters, r.maxStreamDuration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the String method to the wrr.WRR interface.

Actually, why does this work since String is not part of the interface?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface is fmt.Stringer. I don't think we need to explicitly add Stringer everywhere we want to print things; it's a magic part of standard library stuff.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry. I thought you were calling String() on clusters.

}

func (r route) String() string {
return r.m.String() + "->" + fmt.Sprint(r.action)
return fmt.Sprintf("%s -> { clusters: %v, maxStreamDuration: %v }", r.m.String(), r.clusters, r.maxStreamDuration)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry. I thought you were calling String() on clusters.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New features or improvements in behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants