Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DateExtractRegexp = regexp.MustCompile("incoming.tok=.*-(\\d{4}-\\d{2}-\\d{2}T\\d{2}-\\d{2}-\\d{2})")
Functions ¶
This section is empty.
Types ¶
type Archiver ¶
type Archiver struct {
// contains filtered or unexported fields
}
func NewArchiver ¶
func (*Archiver) ArchiveByPath ¶
ArchiveByPath write new archived file and delete old one
type PeriodicArchiver ¶
type PeriodicArchiver struct {
// contains filtered or unexported fields
}
PeriodicArchiver archive log files every configurable unit of time uses Archiver under the hood
func NewPeriodicArchiver ¶
func NewPeriodicArchiver(fileMask, archiveDir string, archiveEvery time.Duration) *PeriodicArchiver
NewPeriodicArchiver return PeriodicArchiver and start observer goroutine
func (*PeriodicArchiver) Close ¶
func (pa *PeriodicArchiver) Close() error
type PeriodicUploader ¶
type PeriodicUploader struct {
// contains filtered or unexported fields
}
PeriodicUploader read already rotated and closed log files Pass them to storages according to tokens Keep uploading log file with result statuses
func NewUploader ¶
func NewUploader(logEventPath, fileMask string, defaultBatchPeriodMin int, concurrentUploads int, destinationService *destinations.Service) (*PeriodicUploader, error)
NewUploader returns new configured PeriodicUploader instance
func (*PeriodicUploader) Start ¶
func (u *PeriodicUploader) Start()
Start reading event logger log directory and finding already rotated and closed files by mask pass them to storages according to tokens keep uploading log statuses file for every event log file
type StatusManager ¶
func NewStatusManager ¶
func NewStatusManager(logFilesDir string) (*StatusManager, error)
func (*StatusManager) CleanUp ¶
func (sm *StatusManager) CleanUp(fileName string)
func (*StatusManager) GetTablesStatuses ¶
func (sm *StatusManager) GetTablesStatuses(fileName, storageName string) map[string]*Status
func (*StatusManager) UpdateStatus ¶
func (sm *StatusManager) UpdateStatus(fileName, storage, table string, err error)
Click to show internal directories.
Click to hide internal directories.