mirror

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPullMirrorToQueue

func AddPullMirrorToQueue(repoID int64)

AddPullMirrorToQueue adds repoID to mirror queue

func AddPushMirrorToQueue

func AddPushMirrorToQueue(mirrorID int64)

AddPushMirrorToQueue adds the push mirror to the queue

func PushToQueue

func PushToQueue(mirrorType SyncType, referenceID int64) error

PushToQueue adds the sync request to the queue

func StartSyncMirrors

func StartSyncMirrors(queueHandle func(data ...queue.Data) []queue.Data)

StartSyncMirrors starts a go routine to sync the mirrors

Types

type SyncRequest

type SyncRequest struct {
	Type        SyncType
	ReferenceID int64 // RepoID for pull mirror, MirrorID for push mirror
}

SyncRequest for the mirror queue

type SyncType

type SyncType int

SyncType type of sync request

const (
	// PullMirrorType for pull mirrors
	PullMirrorType SyncType = iota
	// PushMirrorType for push mirrors
	PushMirrorType
)

Jump to

Keyboard shortcuts

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