|
- package obs
-
- import (
- stgmod "gitlink.org.cn/cloudream/storage2/common/models"
- "gitlink.org.cn/cloudream/storage2/common/pkgs/storage/types"
- )
-
- type Agent struct {
- Detail stgmod.StorageDetail
- ShardStore *ShardStore
- }
-
- func (s *Agent) Start(ch *types.StorageEventChan) {
- if s.ShardStore != nil {
- s.ShardStore.Start(ch)
- }
- }
-
- func (a *Agent) Stop() {
- if a.ShardStore != nil {
- a.ShardStore.Stop()
- }
- }
-
- func (a *Agent) Info() stgmod.StorageDetail {
- return a.Detail
- }
-
- func (a *Agent) GetShardStore() (types.ShardStore, error) {
- if a.ShardStore == nil {
- return nil, types.ErrUnsupported
- }
-
- return a.ShardStore, nil
- }
-
- func (a *Agent) GetPublicStore() (types.PublicStore, error) {
- return nil, types.ErrUnsupported
- }
|