cloudsync

package
v0.0.0-...-cb472e6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudSync

func CloudSync(conf *SyncConf) error

进行云资源同步

func NewTaskProcessor

func NewTaskProcessor(scheduler *taskScheduler) *taskProcessor

func NewTaskScheduler

func NewTaskScheduler(conf *SchedulerConf) (*taskScheduler, error)

调度器实例创建

func SyncCloudResource

func SyncCloudResource(taskChan chan *metadata.CloudSyncTask, conf *SyncConf)

同步云资源

Types

type CloudSyncInterface

type CloudSyncInterface interface {
	Sync(task chan *metadata.CloudSyncTask) error
}

云同步接口

type HostSyncor

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

云主机同步器

func NewHostSyncor

func NewHostSyncor(id int, logics *logics.Logics) *HostSyncor

创建云主机同步器

func (*HostSyncor) SetSyncResultStatus

func (h *HostSyncor) SetSyncResultStatus(syncResult *metadata.SyncResult, startTime time.Time) error

设置SyncResult的状态信息

func (*HostSyncor) Sync

func (h *HostSyncor) Sync(task *metadata.CloudSyncTask) error

同步云主机

type SchedulerConf

type SchedulerConf struct {
	ZKClient  *zkclient.ZkClient
	Logics    *logics.Logics
	AddrPort  string
	MongoConf local.MongoConf
}

调度器配置

type SyncConf

type SyncConf struct {
	ZKClient  *zkclient.ZkClient
	Logics    *logics.Logics
	AddrPort  string
	MongoConf local.MongoConf
}

Jump to

Keyboard shortcuts

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