synchronizer

package
v0.0.0-...-246cd80 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

package synchronizer uploads missing MRT archives to the gRPC archive server. It is only compatible with RouteViews files currently.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FTPServer string
	FTPUser   string
	FTPPass   string

	GCSCli          *storage.Client
	UploadServerCli pb.RVClient
	ArchiveBucket   string
	HTTPRoot        string
}

type Synchronizer

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

func New

func New(cfg *Config) (*Synchronizer, error)

func (*Synchronizer) Sync

func (s *Synchronizer) Sync(ctx context.Context, start, end time.Time) error

Sync syncs MRT archives with the GCS backup. It uses FTP to find all missing files from the given time span, check if any of them are missing, download the missing ones through HTTP (better stability), and upload them through the gRPC upload server. Files are uploaded in order of time per collector.

Jump to

Keyboard shortcuts

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