mongo.go 401 B

12345678910111213141516171819202122
  1. package bus
  2. import (
  3. "context"
  4. "mesh/db"
  5. "mesh/db/repo"
  6. )
  7. const (
  8. AssetState_Empty = 0
  9. AssetState_Waiting = 100 //等待处理
  10. AssetState_Proccing = 101 //正在处理
  11. AssetState_Failed = 102 //处理失败!
  12. AssetState_Succ = 200 //处理成功
  13. )
  14. func CreateRepoCtx() *repo.RepoSession {
  15. return &repo.RepoSession{
  16. Client: db.MongoClient,
  17. Ctx: context.Background(),
  18. }
  19. }