Events returns copies of all captured events with their latest updates.
()
| 30 | |
| 31 | // Events returns copies of all captured events with their latest updates. |
| 32 | func (r *EventRecorderSpy) Events() []ghtelemetry.Event { |
| 33 | var events []ghtelemetry.Event |
| 34 | for _, event := range r.events { |
| 35 | events = append(events, cloneEvent(*event)) |
| 36 | } |
| 37 | return events |
| 38 | } |
| 39 | |
| 40 | // InvocationRecorderSpy adds invocation sampling to EventRecorderSpy. |
| 41 | type InvocationRecorderSpy struct { |