Skip to content

Commit

Permalink
export field
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-srivastava28 committed Mar 18, 2024
1 parent a13268f commit 0f85d3f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion runtime/client_http_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (req *ClientHTTPRequest) Do() (*ClientHTTPResponse, error) {
}

if ec := GetEventContainer(ctx); ec != nil {
ec.events = append(ec.events, event)
ec.Events = append(ec.Events, event)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,5 +656,5 @@ func TestEventContainer(t *testing.T) {
ctx = WithEventContainer(ctx, &EventContainer{})
ec := GetEventContainer(ctx)

assert.Equal(t, len(ec.events), 0)
assert.Equal(t, len(ec.Events), 0)
}
2 changes: 1 addition & 1 deletion runtime/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type Event interface {

// EventContainer holds generated events.
type EventContainer struct {
events []Event
Events []Event
}

// ThriftOutgoingEvent captures request and response data
Expand Down
2 changes: 1 addition & 1 deletion runtime/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (endpoint *RouterEndpoint) HandleRequest(
ec := GetEventContainer(ctx)
var events []Event
if ec != nil {
events = append(events, ec.events...)
events = append(events, ec.Events...)
}

event := &HTTPIncomingEvent{
Expand Down
2 changes: 1 addition & 1 deletion runtime/tchannel_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (c *TChannelClient) call(
}

if ec := GetEventContainer(ctx); ec != nil {
ec.events = append(ec.events, event)
ec.Events = append(ec.Events, event)
}
}

Expand Down

0 comments on commit 0f85d3f

Please sign in to comment.