package services import ( "fmt" stgglb "gitlink.org.cn/cloudream/storage/common/globals" coormq "gitlink.org.cn/cloudream/storage/common/pkgs/mq/coordinator" ) func (svc *ObjectService) GetDatabaseAll() (*coormq.GetDatabaseAllResp, error) { coorCli, err := stgglb.CoordinatorMQPool.Acquire() if err != nil { return nil, fmt.Errorf("new coordinator client: %w", err) } defer stgglb.CoordinatorMQPool.Release(coorCli) getResp, err := coorCli.GetDatabaseAll(coormq.ReqGetDatabaseAll(1)) if err != nil { return nil, fmt.Errorf("requsting to coodinator: %w", err) } return getResp, nil }