Documentation
¶
Index ¶
- func DeleteClustersCache(uid string)
- func NewBatchWithRetry(ctx context.Context, dao *DAO, syncResponse *model.SyncResponse) batchWithRetry
- func ReadClustersCache(uid string) (interface{}, bool)
- func UpdateClustersCache(uid string, data interface{})
- type DAO
- func (dao *DAO) ClusterTotals(ctx context.Context, clusterName string) (resources int, edges int, e error)
- func (dao *DAO) DeleteClusterAndResources(ctx context.Context, clusterName string, deleteClusterNode bool)
- func (dao *DAO) DeleteClusterResourcesTxn(ctx context.Context, clusterName string) error
- func (dao *DAO) DeleteClusterTxn(ctx context.Context, clusterUID string) error
- func (dao *DAO) GetManagedClusters(ctx context.Context) ([]string, error)
- func (dao *DAO) InitializeTables(ctx context.Context)
- func (dao *DAO) ResyncData(ctx context.Context, event model.SyncEvent, clusterName string, ...) error
- func (dao *DAO) SyncData(ctx context.Context, event model.SyncEvent, clusterName string, ...) error
- func (dao *DAO) UpsertCluster(ctx context.Context, resource model.Resource)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteClustersCache ¶
func DeleteClustersCache(uid string)
func NewBatchWithRetry ¶
func NewBatchWithRetry(ctx context.Context, dao *DAO, syncResponse *model.SyncResponse) batchWithRetry
func ReadClustersCache ¶
func UpdateClustersCache ¶
func UpdateClustersCache(uid string, data interface{})
Types ¶
type DAO ¶
type DAO struct {
// contains filtered or unexported fields
}
Database Access Object. Use a DAO instance so we can replace the pool object in the unit tests.
func (*DAO) ClusterTotals ¶
func (dao *DAO) ClusterTotals(ctx context.Context, clusterName string) (resources int, edges int, e error)
Query resource and edge count for a cluster. Used for data validation.
func (*DAO) DeleteClusterAndResources ¶
func (*DAO) DeleteClusterResourcesTxn ¶
func (*DAO) DeleteClusterTxn ¶
func (*DAO) GetManagedClusters ¶
Query database for managed clusters:
func (*DAO) InitializeTables ¶
func (*DAO) ResyncData ¶
func (dao *DAO) ResyncData(ctx context.Context, event model.SyncEvent, clusterName string, syncResponse *model.SyncResponse) error
Reset data for the cluster to the incoming state.
Click to show internal directories.
Click to hide internal directories.