Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SyncDataActionAdd is add action on SyncData. SyncDataActionAdd = "Add" // SyncDataActionDelete is delete action on SyncData. SyncDataActionDelete = "Delete" // SyncDataActionUpdate is update action on SyncData. SyncDataActionUpdate = "Update" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alertor ¶
func NewAlertor ¶
type StorageAction ¶
type StorageAction struct {
// contains filtered or unexported fields
}
StorageAction is http action of storage service.
func NewStorageAction ¶
func NewStorageAction(clusterID, name string, storageService *bcs.InnerService) *StorageAction
NewStorageAction creates a new StorageAction instance.
func (*StorageAction) Add ¶
func (act *StorageAction) Add(syncData *SyncData)
Add adds new resource data by http PUT.
func (*StorageAction) Delete ¶
func (act *StorageAction) Delete(syncData *SyncData)
Delete deletes target resource data by http DELETE.
func (*StorageAction) Update ¶
func (act *StorageAction) Update(syncData *SyncData)
Update updates old resource data by http PUT.
type SyncData ¶
type SyncData struct { // Kind is resource kind. Kind string // Namespace is k8s resource namespace. Namespace string // Name is resource name. Name string // Action is SyncDataAction Add/Delete/Update. Action string // Data is resource metadata. Data interface{} // OwnerUID is resource owner id. OwnerUID string }
SyncData is metadata would be synced to storage.
Click to show internal directories.
Click to hide internal directories.