sync

package
v0.0.0-...-bf83fb3 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ECode060201 = e.Code0602 + "01"
	ECode060202 = e.Code0602 + "02"
	ECode060203 = e.Code0602 + "03"
)
View Source
const (
	MaxGoRoutinesAllowed    = 1000 // The maximum allowed number of go routines
	DefaultMaxNumGoRoutines = 25

	ECode060101 = e.Code0601 + "01"
	ECode060102 = e.Code0601 + "02"
	ECode060103 = e.Code0601 + "03"
	ECode060104 = e.Code0601 + "04"
	ECode060105 = e.Code0601 + "05"
	ECode060106 = e.Code0601 + "06"
)
View Source
const (
	MIGRATION_CODE = "sync"
)

Variables

This section is empty.

Functions

func GetMigrationList

func GetMigrationList() (ml *migration.List)

GetMigrationList returns this packages migration list

func SyncUpsert

func SyncUpsert(db *sql.Connection, itemID int, input []*model.SyncQueue) (err error)

SyncUpsert performs the DB operation to upsert a record in the sync_queue

Types

type Provider

type Provider interface {
	GetSyncQueueObject(itemID int, syncItemType string) *model.SyncQueue
	HandleItemQueue(db *sql.Connection, item *model.SyncQueue) (err error)
	Send(db *sql.Connection, so *model.SyncQueue) (err error)
}

Provider interface for the sync services

type Service

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

func NewService

func NewService(p Provider) *Service

NewService returns an instance of a service provider

func (*Service) Process

func (s *Service) Process(db *sql.Connection, serviceName string,
	maxGoRoutines int) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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