Documentation ¶
Index ¶
Constants ¶
View Source
const BROTLI_COMPRESSION_LEVEL = 5
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompressedWriter ¶
type CompressedWriter struct {
// contains filtered or unexported fields
}
func NewCompressedWriter ¶
func NewCompressedWriter(brFile *os.File) *CompressedWriter
Initializes a new writer with the configured compression level
func (*CompressedWriter) Close ¶
func (w *CompressedWriter) Close() error
Appends a closing bracket to close the JSON array, and closes the underlying writer
func (*CompressedWriter) WriteObject ¶
func (w *CompressedWriter) WriteObject(events model.Object, unmarshalled Unmarshalled) error
Merges the inner contents of the input events objects into a large JSON array
func (*CompressedWriter) WriteString ¶
func (w *CompressedWriter) WriteString(data string) error
type EventsUnmarshalled ¶
type EventsUnmarshalled struct {
Events []interface{}
}
type MessagesUnmarshalled ¶
type MessagesUnmarshalled struct {
Messages []interface{}
}
type PayloadManager ¶
type PayloadManager struct { EventsCompressed *CompressedWriter ResourcesCompressed *CompressedWriter WebSocketEventsCompressed *CompressedWriter EventsChunked *CompressedWriter TimelineIndicatorEvents *CompressedWriter ChunkIndex int // contains filtered or unexported fields }
func NewPayloadManager ¶
func NewPayloadManager(ctx context.Context, filenamePrefix string) (*PayloadManager, error)
func (*PayloadManager) Close ¶
func (pm *PayloadManager) Close()
func (*PayloadManager) NewChunkedFile ¶
func (pm *PayloadManager) NewChunkedFile(ctx context.Context, filenamePrefix string) error
func (*PayloadManager) ReportPayloadSizes ¶
func (pm *PayloadManager) ReportPayloadSizes() error
func (*PayloadManager) SeekStart ¶
func (pm *PayloadManager) SeekStart(ctx context.Context)
Reset file pointers to beginning of file for reading
type ResourcesUnmarshalled ¶
type ResourcesUnmarshalled struct {
Resources []interface{}
}
type Unmarshalled ¶
type Unmarshalled interface {
// contains filtered or unexported methods
}
type WebSocketEventsUnmarshalled ¶
type WebSocketEventsUnmarshalled struct {
WebSocketEvents []interface{}
}
Click to show internal directories.
Click to hide internal directories.