Documentation ¶
Index ¶
- func AddPullMirrorToQueue(repoID int64)
- func AddPushMirrorRemote(ctx context.Context, m *repo_model.PushMirror, addr string) error
- func AddPushMirrorToQueue(mirrorID int64)
- func InitSyncMirrors()
- func PushToQueue(mirrorType SyncType, referenceID int64) error
- func RemovePushMirrorRemote(ctx context.Context, m *repo_model.PushMirror) error
- func StartSyncMirrors()
- func SyncPullMirror(ctx context.Context, repoID int64) bool
- func SyncPushMirror(ctx context.Context, mirrorID int64) bool
- func Update(ctx context.Context, pullLimit, pushLimit int) error
- func UpdateAddress(ctx context.Context, m *repo_model.Mirror, addr string) error
- type SyncRequest
- type SyncType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPullMirrorToQueue ¶
func AddPullMirrorToQueue(repoID int64)
AddPullMirrorToQueue adds repoID to mirror queue
func AddPushMirrorRemote ¶
func AddPushMirrorRemote(ctx context.Context, m *repo_model.PushMirror, addr string) error
AddPushMirrorRemote registers the push mirror remote.
func AddPushMirrorToQueue ¶
func AddPushMirrorToQueue(mirrorID int64)
AddPushMirrorToQueue adds the push mirror to the queue
func InitSyncMirrors ¶
func InitSyncMirrors()
InitSyncMirrors initializes a go routine to sync the mirrors
func PushToQueue ¶
PushToQueue adds the sync request to the queue
func RemovePushMirrorRemote ¶
func RemovePushMirrorRemote(ctx context.Context, m *repo_model.PushMirror) error
RemovePushMirrorRemote removes the push mirror remote.
func StartSyncMirrors ¶
func StartSyncMirrors()
StartSyncMirrors starts a go routine to sync the mirrors
func SyncPullMirror ¶
SyncPullMirror starts the sync of the pull mirror and schedules the next run.
func SyncPushMirror ¶
SyncPushMirror starts the sync of the push mirror and schedules the next run.
func UpdateAddress ¶
UpdateAddress writes new address to Git repository and database
Types ¶
type SyncRequest ¶
type SyncRequest struct { Type SyncType ReferenceID int64 // RepoID for pull mirror, MirrorID for push mirror }
SyncRequest for the mirror queue
Click to show internal directories.
Click to hide internal directories.