payload

package
v0.0.0-...-77f0b0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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 FileInfo

type FileInfo struct {
	// contains filtered or unexported fields
}

type FileType

type FileType string
const (
	EventsCompressed          FileType = "EventsCompressed"
	ResourcesCompressed       FileType = "ResourcesCompressed"
	WebSocketEventsCompressed FileType = "WebSocketEventsCompressed"
	EventsChunked             FileType = "EventsChunked"
	TimelineIndicatorEvents   FileType = "TimelineIndicatorEvents"
)

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) GetFile

func (pm *PayloadManager) GetFile(fileType FileType) *os.File

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{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL