| @@ -5,7 +5,6 @@ require ( | |||||
| gitlink.org.cn/cloudream/ec v0.0.0 | gitlink.org.cn/cloudream/ec v0.0.0 | ||||
| gitlink.org.cn/cloudream/proto v0.0.0 | gitlink.org.cn/cloudream/proto v0.0.0 | ||||
| gitlink.org.cn/cloudream/rabbitmq v0.0.0 | gitlink.org.cn/cloudream/rabbitmq v0.0.0 | ||||
| gitlink.org.cn/cloudream/utils v0.0.0 | |||||
| google.golang.org/grpc v1.54.0 | google.golang.org/grpc v1.54.0 | ||||
| ) | ) | ||||
| @@ -65,8 +64,6 @@ go 1.18 | |||||
| // | // | ||||
| // replace gitlink.org.cn/cloudream/rabbitmq => ../rabbitmq | // replace gitlink.org.cn/cloudream/rabbitmq => ../rabbitmq | ||||
| // | // | ||||
| // replace gitlink.org.cn/cloudream/utils => ../utils | |||||
| // | |||||
| // replace gitlink.org.cn/cloudream/common => ../common | // replace gitlink.org.cn/cloudream/common => ../common | ||||
| // | // | ||||
| // replace gitlink.org.cn/cloudream/db => ../db | // replace gitlink.org.cn/cloudream/db => ../db | ||||
| @@ -1,10 +1,10 @@ | |||||
| package config | package config | ||||
| import ( | import ( | ||||
| c "gitlink.org.cn/cloudream/common/utils/config" | |||||
| "gitlink.org.cn/cloudream/common/utils/ipfs" | |||||
| log "gitlink.org.cn/cloudream/common/utils/logger" | |||||
| racfg "gitlink.org.cn/cloudream/rabbitmq/config" | racfg "gitlink.org.cn/cloudream/rabbitmq/config" | ||||
| c "gitlink.org.cn/cloudream/utils/config" | |||||
| "gitlink.org.cn/cloudream/utils/ipfs" | |||||
| log "gitlink.org.cn/cloudream/utils/logger" | |||||
| ) | ) | ||||
| type Config struct { | type Config struct { | ||||
| @@ -2,9 +2,9 @@ package cmd | |||||
| import ( | import ( | ||||
| "gitlink.org.cn/cloudream/common/consts/errorcode" | "gitlink.org.cn/cloudream/common/consts/errorcode" | ||||
| log "gitlink.org.cn/cloudream/common/utils/logger" | |||||
| ramsg "gitlink.org.cn/cloudream/rabbitmq/message" | ramsg "gitlink.org.cn/cloudream/rabbitmq/message" | ||||
| agtmsg "gitlink.org.cn/cloudream/rabbitmq/message/agent" | agtmsg "gitlink.org.cn/cloudream/rabbitmq/message/agent" | ||||
| log "gitlink.org.cn/cloudream/utils/logger" | |||||
| ) | ) | ||||
| func (svc *Service) PinObject(msg *agtmsg.PinObject) *agtmsg.PinObjectResp { | func (svc *Service) PinObject(msg *agtmsg.PinObject) *agtmsg.PinObjectResp { | ||||
| @@ -1,6 +1,6 @@ | |||||
| package cmd | package cmd | ||||
| import "gitlink.org.cn/cloudream/utils/ipfs" | |||||
| import "gitlink.org.cn/cloudream/common/utils/ipfs" | |||||
| type Service struct { | type Service struct { | ||||
| ipfs *ipfs.IPFS | ipfs *ipfs.IPFS | ||||
| @@ -9,10 +9,10 @@ import ( | |||||
| "gitlink.org.cn/cloudream/agent/internal/config" | "gitlink.org.cn/cloudream/agent/internal/config" | ||||
| "gitlink.org.cn/cloudream/common/consts" | "gitlink.org.cn/cloudream/common/consts" | ||||
| "gitlink.org.cn/cloudream/common/utils" | |||||
| log "gitlink.org.cn/cloudream/common/utils/logger" | |||||
| "gitlink.org.cn/cloudream/common/utils/serder" | |||||
| "gitlink.org.cn/cloudream/ec" | "gitlink.org.cn/cloudream/ec" | ||||
| "gitlink.org.cn/cloudream/utils" | |||||
| log "gitlink.org.cn/cloudream/utils/logger" | |||||
| "gitlink.org.cn/cloudream/utils/serder" | |||||
| "gitlink.org.cn/cloudream/common/consts/errorcode" | "gitlink.org.cn/cloudream/common/consts/errorcode" | ||||
| ramsg "gitlink.org.cn/cloudream/rabbitmq/message" | ramsg "gitlink.org.cn/cloudream/rabbitmq/message" | ||||
| @@ -4,10 +4,10 @@ import ( | |||||
| "fmt" | "fmt" | ||||
| "io" | "io" | ||||
| myio "gitlink.org.cn/cloudream/common/utils/io" | |||||
| "gitlink.org.cn/cloudream/common/utils/ipfs" | |||||
| log "gitlink.org.cn/cloudream/common/utils/logger" | |||||
| agentserver "gitlink.org.cn/cloudream/proto" | agentserver "gitlink.org.cn/cloudream/proto" | ||||
| myio "gitlink.org.cn/cloudream/utils/io" | |||||
| "gitlink.org.cn/cloudream/utils/ipfs" | |||||
| log "gitlink.org.cn/cloudream/utils/logger" | |||||
| ) | ) | ||||
| type GRPCService struct { | type GRPCService struct { | ||||
| @@ -5,9 +5,9 @@ import ( | |||||
| "sync" | "sync" | ||||
| "github.com/zyedidia/generic/list" | "github.com/zyedidia/generic/list" | ||||
| "gitlink.org.cn/cloudream/common/utils/ipfs" | |||||
| mydb "gitlink.org.cn/cloudream/db" | mydb "gitlink.org.cn/cloudream/db" | ||||
| sccli "gitlink.org.cn/cloudream/rabbitmq/client/scanner" | sccli "gitlink.org.cn/cloudream/rabbitmq/client/scanner" | ||||
| "gitlink.org.cn/cloudream/utils/ipfs" | |||||
| "golang.org/x/sync/semaphore" | "golang.org/x/sync/semaphore" | ||||
| ) | ) | ||||
| @@ -7,9 +7,9 @@ import ( | |||||
| "sync" | "sync" | ||||
| "gitlink.org.cn/cloudream/agent/internal/config" | "gitlink.org.cn/cloudream/agent/internal/config" | ||||
| "gitlink.org.cn/cloudream/common/utils/ipfs" | |||||
| log "gitlink.org.cn/cloudream/common/utils/logger" | |||||
| agentserver "gitlink.org.cn/cloudream/proto" | agentserver "gitlink.org.cn/cloudream/proto" | ||||
| "gitlink.org.cn/cloudream/utils/ipfs" | |||||
| log "gitlink.org.cn/cloudream/utils/logger" | |||||
| "google.golang.org/grpc" | "google.golang.org/grpc" | ||||
| @@ -6,10 +6,10 @@ import ( | |||||
| "gitlink.org.cn/cloudream/agent/internal/config" | "gitlink.org.cn/cloudream/agent/internal/config" | ||||
| "gitlink.org.cn/cloudream/common/consts" | "gitlink.org.cn/cloudream/common/consts" | ||||
| "gitlink.org.cn/cloudream/common/utils" | |||||
| log "gitlink.org.cn/cloudream/common/utils/logger" | |||||
| coorcli "gitlink.org.cn/cloudream/rabbitmq/client/coordinator" | coorcli "gitlink.org.cn/cloudream/rabbitmq/client/coordinator" | ||||
| coormsg "gitlink.org.cn/cloudream/rabbitmq/message/coordinator" | coormsg "gitlink.org.cn/cloudream/rabbitmq/message/coordinator" | ||||
| "gitlink.org.cn/cloudream/utils" | |||||
| log "gitlink.org.cn/cloudream/utils/logger" | |||||
| ) | ) | ||||
| func reportStatus(wg *sync.WaitGroup) { | func reportStatus(wg *sync.WaitGroup) { | ||||
| @@ -52,7 +52,7 @@ func reportStatus(wg *sync.WaitGroup) { | |||||
| //TODO: 查看本地IPFS daemon是否正常,记录到ipfsStatus | //TODO: 查看本地IPFS daemon是否正常,记录到ipfsStatus | ||||
| ipfsStatus := consts.IPFS_STATUS_OK | ipfsStatus := consts.IPFS_STATUS_OK | ||||
| //TODO:访问自身资源目录(配置文件中获取路径),记录是否正常,记录到localDirStatus | //TODO:访问自身资源目录(配置文件中获取路径),记录是否正常,记录到localDirStatus | ||||
| localDirStatus := consts.LOCAL_DIR_STATUS_OK | |||||
| localDirStatus := consts.STORAGE_DIRECTORY_STATUS_OK | |||||
| //发送心跳 | //发送心跳 | ||||
| // TODO 由于数据结构未定,暂时不发送真实数据 | // TODO 由于数据结构未定,暂时不发送真实数据 | ||||