fallback

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractEvents

func ExtractEvents(b []byte, rawFile, skipMalformed bool) ([]map[string]interface{}, error)

ExtractEvents parses input bytes as plain jsons or fallback jsons or fallback jsons with skipping malformed objects

Types

type FileStatus

type FileStatus struct {
	FileName      string                      `json:"file_name"`
	DestinationID string                      `json:"destination_id"`
	TablesStatus  map[string]*logfiles.Status `json:"tables_statuses"`
}

type Service

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

Service stores and processes fallback files

func NewService

func NewService(logEventsPath string, destinationService *destinations.Service, usersRecognition events.Recognition) (*Service, error)

NewService returns configured Service

func NewTestService

func NewTestService() *Service

NewTestService returns test instance - only for tests

func (*Service) GetFileStatuses

func (s *Service) GetFileStatuses(destinationsFilter map[string]bool) []*FileStatus

GetFileStatuses returns all fallback files with their statuses

func (*Service) Replay

func (s *Service) Replay(fileName, destinationID string, rawFile, skipMalformed bool) error

Replay processes fallback file (or plain file) and store it in the destination

Jump to

Keyboard shortcuts

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