Skip to content

Commit

Permalink
Merge ed29771 into 8c037de
Browse files Browse the repository at this point in the history
  • Loading branch information
mahipjain committed Jul 12, 2023
2 parents 8c037de + ed29771 commit 0109d7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/tchannel_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ type TChannelClientOption struct {

// MaxAttempts is the maximum retry count for a client
MaxAttempts int

// RetryOn is the types of errors to retry on.
RetryOn tchannel.RetryOn
}

// TChannelClient implements TChannelCaller and makes outgoing Thrift calls.
Expand All @@ -98,6 +101,7 @@ type TChannelClient struct {
headerPatterns []string
altChannelMap map[string]*tchannel.SubChannel
maxAttempts int
retryOn tchannel.RetryOn
}

// NewTChannelClient is deprecated, use NewTChannelClientContext instead
Expand Down Expand Up @@ -143,6 +147,7 @@ func NewTChannelClientContext(
headerPatterns: opt.HeaderPatterns,
altChannelMap: opt.AltChannelMap,
maxAttempts: opt.MaxAttempts,
retryOn: opt.RetryOn,
}
return client
}
Expand Down Expand Up @@ -205,6 +210,7 @@ func (c *TChannelClient) call(
retryOpts := tchannel.RetryOptions{
TimeoutPerAttempt: c.timeoutPerAttempt,
MaxAttempts: c.maxAttempts,
RetryOn: c.retryOn,
}

//override timeout and retry config with endpoint level’s config
Expand Down

0 comments on commit 0109d7d

Please sign in to comment.