TelemetryRotator
@hardkas/core / TelemetryRotator
Class: TelemetryRotator
Defined in: packages/core/src/retention.ts:11
Constructors
Constructor
new TelemetryRotator():
TelemetryRotator
Returns
TelemetryRotator
Methods
forceRotate()
staticforceRotate(rootDir):RotationResult
Defined in: packages/core/src/retention.ts:43
Forces a rotation regardless of file size.
Parameters
rootDir
string
Returns
listArchivedSegments()
staticlistArchivedSegments(rootDir):string[]
Defined in: packages/core/src/retention.ts:76
Lists all archived telemetry segments.
Parameters
rootDir
string
Returns
string[]
rotateIfNeeded()
staticrotateIfNeeded(rootDir,maxSizeBytes?):RotationResult
Defined in: packages/core/src/retention.ts:18
Rotates the telemetry stream if it exceeds the maximum size. This is a safe operation that renames the active file to an archive directory.
Parameters
rootDir
string
maxSizeBytes?
number = ...