You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

agent.go 732 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package obs
  2. import (
  3. stgmod "gitlink.org.cn/cloudream/storage2/common/models"
  4. "gitlink.org.cn/cloudream/storage2/common/pkgs/storage/types"
  5. )
  6. type Agent struct {
  7. Detail stgmod.StorageDetail
  8. ShardStore *ShardStore
  9. }
  10. func (s *Agent) Start(ch *types.StorageEventChan) {
  11. if s.ShardStore != nil {
  12. s.ShardStore.Start(ch)
  13. }
  14. }
  15. func (a *Agent) Stop() {
  16. if a.ShardStore != nil {
  17. a.ShardStore.Stop()
  18. }
  19. }
  20. func (a *Agent) Info() stgmod.StorageDetail {
  21. return a.Detail
  22. }
  23. func (a *Agent) GetShardStore() (types.ShardStore, error) {
  24. if a.ShardStore == nil {
  25. return nil, types.ErrUnsupported
  26. }
  27. return a.ShardStore, nil
  28. }
  29. func (a *Agent) GetPublicStore() (types.PublicStore, error) {
  30. return nil, types.ErrUnsupported
  31. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。