Skip to content

XRayEmitter

pokryfka edited this page Aug 4, 2020 · 3 revisions

XRayEmitter

A type representing the ability to emit XRayRecorder.Segment.

public protocol XRayEmitter

Requirements

send(_:​)

Sends XRayRecorder.Segment. Should NOT be blocking.

func send(_ segment:​ XRayRecorder.Segment)

Emitter may choose to postpone the operation and send XRayRecorder.Segments in batches.

Parameters

  • segment:​ - segment:​ segment

flush(_:​)

Sends pending XRayRecorder.Segments, May be blocking.

func flush(_ callback:@escaping (Error?) -> Void)

Parameters

  • callback:​ - callback:​ callback with error if the operation failed.

shutdown(_:​)

Sends pending XRayRecorder.Segments, May be blocking.

func shutdown(_ callback:@escaping (Error?) -> Void)

Parameters

  • callback:​ - callback:​ callback with error if the operation failed.