mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
云上操作日志同步
This commit is contained in:
@@ -55,6 +55,9 @@ type ICloudProviderFactory interface {
|
||||
NeedSyncSkuFromCloud() bool
|
||||
|
||||
IsSupportObjectStorage() bool
|
||||
IsCloudeventRegional() bool
|
||||
GetMaxCloudEventSyncDays() int
|
||||
GetMaxCloudEventKeepDays() int
|
||||
}
|
||||
|
||||
type ICloudProvider interface {
|
||||
@@ -219,6 +222,18 @@ func (factory *baseProviderFactory) IsOnPremise() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) IsCloudeventRegional() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) GetMaxCloudEventSyncDays() int {
|
||||
return 7
|
||||
}
|
||||
|
||||
func (factory *baseProviderFactory) GetMaxCloudEventKeepDays() int {
|
||||
return 7
|
||||
}
|
||||
|
||||
type SPremiseBaseProviderFactory struct {
|
||||
baseProviderFactory
|
||||
}
|
||||
|
||||
@@ -132,6 +132,8 @@ type ICloudRegion interface {
|
||||
CreateIElasticcaches(ec *SCloudElasticCacheInput) (ICloudElasticcache, error)
|
||||
|
||||
GetProvider() string
|
||||
|
||||
GetICloudEvents(start time.Time, end time.Time, withReadEvent bool) ([]ICloudEvent, error) //获取公有云操作日志接口
|
||||
}
|
||||
|
||||
type ICloudZone interface {
|
||||
@@ -913,3 +915,16 @@ type ICloudElasticcacheParameter interface {
|
||||
GetModifiable() bool
|
||||
GetForceRestart() bool
|
||||
}
|
||||
|
||||
type ICloudEvent interface {
|
||||
GetName() string
|
||||
GetService() string
|
||||
GetAction() string
|
||||
GetResourceType() string
|
||||
GetRequestId() string
|
||||
GetRequest() jsonutils.JSONObject
|
||||
GetAccount() string
|
||||
IsSuccess() bool
|
||||
|
||||
GetCreatedAt() time.Time
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user