Documentation ¶
Index ¶
- Constants
- type DataAccess
- func (d *DataAccess) Close() error
- func (d *DataAccess) CountNodeInfoWithHash(name, hash string) (int, error)
- func (d *DataAccess) CountPodInfoWithSpecHash(uid, hash string) (int, error)
- func (d *DataAccess) GetCADeploymentWithHash(Hash string) (caDeployment *scalehist.CASettingsInfo, err error)
- func (d *DataAccess) GetEventCAAssocWithEventUID(eventUID string) (eventCAAssoc *scalehist.EventCASettingsAssoc, err error)
- func (d *DataAccess) GetLatestCADeployment() (caDeployment *scalehist.CASettingsInfo, err error)
- func (d *DataAccess) GetLatestNodesBeforeAndNotDeleted(timestamp time.Time) ([]scalehist.NodeInfo, error)
- func (d *DataAccess) GetLatestPodsBeforeTimestamp(eventTime time.Time) (pods []scalehist.PodInfo, err error)
- func (d *DataAccess) GetLatestScheduledPodsBeforeTimestamp(eventTime time.Time) (pods []scalehist.PodInfo, err error)
- func (d *DataAccess) GetLatestUnscheduledPodsBeforeTimestamp(timeStamp time.Time) ([]scalehist.PodInfo, error)
- func (d *DataAccess) GetMaxNodeGroupGeneration() (int, error)
- func (d *DataAccess) GetMaxPDBGeneration(pdbUid string) (int, error)
- func (d *DataAccess) GetMaxShootGeneration() (int, error)
- func (d *DataAccess) GetNodeGroupHash(ngName string) (string, error)
- func (d *DataAccess) GetNodeGroupsWithEventUIDAndSameHash(eventUIDs []string) ([]NodeGroupWithEventUID, error)
- func (d *DataAccess) Init() error
- func (d *DataAccess) LoadAllActiveNodeGroupsDesc() (nodeGroups []scalehist.NodeGroupInfo, err error)
- func (d *DataAccess) LoadAllEvents() (events []scalehist.EventInfo, err error)
- func (d *DataAccess) LoadEventInfoWithUID(eventUID string) (eventInfo scalehist.EventInfo, err error)
- func (d *DataAccess) LoadEventNGAssocForEventUID(eventUID string) (assoc scalehist.EventNodeGroupAssoc, err error)
- func (d *DataAccess) LoadLatestNodeGroup(ngName string) (ng scalehist.NodeGroupInfo, err error)
- func (d *DataAccess) LoadLatestPodInfoWithName(podName string) (podInfo scalehist.PodInfo, err error)
- func (d *DataAccess) LoadNodeGroupsWithEventUIDAndSameHash() (nodeGroups []NodeGroupWithEventUID, err error)
- func (d *DataAccess) LoadNodeInfosBefore(creationTimestamp time.Time) ([]scalehist.NodeInfo, error)
- func (d *DataAccess) StoreCADeployment(caSettings scalehist.CASettingsInfo) (int64, error)
- func (d *DataAccess) StoreEventCASettingsAssoc(assoc scalehist.EventCASettingsAssoc) error
- func (d *DataAccess) StoreEventInfo(event scalehist.EventInfo) error
- func (d *DataAccess) StoreEventNGAssoc(assoc scalehist.EventNodeGroupAssoc) error
- func (d *DataAccess) StoreNodeGroup(ng scalehist.NodeGroupInfo) (rowID int64, err error)
- func (d *DataAccess) StoreNodeInfo(n scalehist.NodeInfo) (rowID int64, err error)
- func (d *DataAccess) StorePodInfo(podInfo scalehist.PodInfo) (int64, error)
- func (d *DataAccess) UpdateLatestNodeGroupTargetSize(nodeGroupName string, targetSize int) (updated int64, err error)
- func (d *DataAccess) UpdateNodeGroupDeletionTimestamp(nodeGroupHash string, deletionTimestamp time.Time) (updated int64, err error)
- func (d *DataAccess) UpdateNodeInfoDeletionTimestamp(name string, deletionTimestamp time.Time) (updated int64, err error)
- func (d *DataAccess) UpdatePodDeletionTimestamp(podUID types.UID, deletionTimestamp time.Time) (updated int64, err error)
- type NodeGroupWithEventUID
Constants ¶
View Source
const CreateCASettingsInfoTable = `` /* 158-byte string literal not displayed */
View Source
const CreateEventCAAssocTable = `CREATE TABLE IF NOT EXISTS event_ca_assoc(
EventUID TEXT PRIMARY KEY ,
CASettingsHash TEXT
)`
View Source
const CreateEventInfoTable = `` /* 311-byte string literal not displayed */
View Source
const CreateEventNodeGroupAssocTable = `` /* 153-byte string literal not displayed */
View Source
const CreateNodeGroupInfoTable = `` /* 414-byte string literal not displayed */
View Source
const CreateNodeInfoTable = `` /* 279-byte string literal not displayed */
View Source
const CreatePodInfoTable = `` /* 284-byte string literal not displayed */
View Source
const InsertCADeployment = `INSERT INTO ca_settings_info (
Expander,
MaxNodesTotal,
Priorities,
Hash
) VALUES (? ,? , ? ,?)`
View Source
const InsertEvent = `` /* 232-byte string literal not displayed */
View Source
const InsertEventCAAssoc = `INSERT INTO event_ca_assoc(
EventUID,
CASettingsHash
) VALUES(?,?)`
View Source
const InsertEventNodeGroupAssoc = `` /* 139-byte string literal not displayed */
View Source
const InsertNodeGroupInfo = `` /* 266-byte string literal not displayed */
View Source
const InsertNodeInfo = `` /* 187-byte string literal not displayed */
View Source
const InsertPodInfo = `` /* 222-byte string literal not displayed */
View Source
const SelectCADeploymentByHash = `SELECT * FROM ca_settings_info WHERE Hash=?`
View Source
const SelectEventCAAssocWithEventUID = `SELECT * FROM event_ca_assoc WHERE EventUID = ?`
View Source
const SelectLatestCADeployment = `SELECT * FROM ca_settings_info ORDER BY Id DESC LIMIT 1`
View Source
const SelectLatestNodesBeforeAndNotDeleted = `` /* 152-byte string literal not displayed */
View Source
const SelectLatestNominatedPodsBeforeCreationTimestamp = `` /* 230-byte string literal not displayed */
View Source
const SelectLatestPodsBeforeCreationTimestamp = `` /* 156-byte string literal not displayed */
View Source
const SelectLatestScheduledPodsBeforeCreationTimestamp = `` /* 230-byte string literal not displayed */
View Source
const SelectNodeCountWithNameAndHash = "SELECT COUNT(*) from node_info where Name=? and Hash=?"
View Source
const SelectNodeGroupBefore = `SELECT * from nodegroup_info where CreationTimestamp < ? AND DeletionTimestamp is null ORDER BY CreationTimestamp DESC`
View Source
const SelectNodeGroupBeforeEventUIDAndSameHash = `` /* 343-byte string literal not displayed */
View Source
const SelectNodeInfoBefore = `SELECT * FROM node_info WHERE CreationTimestamp < ? AND DeletionTimestamp IS NULL ORDER BY CreationTimestamp DESC`
View Source
const SelectPodCountWithUIDAndHash = "SELECT COUNT(*) from pod_info where UID=? and Hash=?"
View Source
const SelectPodsWithEmptyNameAndBeforeCreationTimestamp = `` /* 221-byte string literal not displayed */
View Source
const UpdateLatestNodeGroupInfo = `UPDATE nodegroup_info SET TargetSize=? WHERE RowID=(SELECT max(RowID) FROM nodegroup_info where Name = ?)`
View Source
const UpdateNodeInfoDeletionTimestamp = `UPDATE node_info SET DeletionTimestamp = ? where Name = ?`
View Source
const UpdatePodDeletionTimestamp = "UPDATE pod_info SET DeletionTimestamp=? WHERE UID=?"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataAccess ¶
func NewDataAccess ¶
func NewDataAccess(dataDBPath string) *DataAccess
func (*DataAccess) Close ¶
func (d *DataAccess) Close() error
func (*DataAccess) CountNodeInfoWithHash ¶
func (d *DataAccess) CountNodeInfoWithHash(name, hash string) (int, error)
func (*DataAccess) CountPodInfoWithSpecHash ¶
func (d *DataAccess) CountPodInfoWithSpecHash(uid, hash string) (int, error)
func (*DataAccess) GetCADeploymentWithHash ¶
func (d *DataAccess) GetCADeploymentWithHash(Hash string) (caDeployment *scalehist.CASettingsInfo, err error)
func (*DataAccess) GetEventCAAssocWithEventUID ¶
func (d *DataAccess) GetEventCAAssocWithEventUID(eventUID string) (eventCAAssoc *scalehist.EventCASettingsAssoc, err error)
func (*DataAccess) GetLatestCADeployment ¶
func (d *DataAccess) GetLatestCADeployment() (caDeployment *scalehist.CASettingsInfo, err error)
func (*DataAccess) GetLatestNodesBeforeAndNotDeleted ¶
func (*DataAccess) GetLatestPodsBeforeTimestamp ¶
func (*DataAccess) GetLatestScheduledPodsBeforeTimestamp ¶
func (*DataAccess) GetLatestUnscheduledPodsBeforeTimestamp ¶
func (*DataAccess) GetMaxNodeGroupGeneration ¶
func (d *DataAccess) GetMaxNodeGroupGeneration() (int, error)
func (*DataAccess) GetMaxPDBGeneration ¶
func (d *DataAccess) GetMaxPDBGeneration(pdbUid string) (int, error)
func (*DataAccess) GetMaxShootGeneration ¶
func (d *DataAccess) GetMaxShootGeneration() (int, error)
func (*DataAccess) GetNodeGroupHash ¶
func (d *DataAccess) GetNodeGroupHash(ngName string) (string, error)
func (*DataAccess) GetNodeGroupsWithEventUIDAndSameHash ¶
func (d *DataAccess) GetNodeGroupsWithEventUIDAndSameHash(eventUIDs []string) ([]NodeGroupWithEventUID, error)
func (*DataAccess) Init ¶
func (d *DataAccess) Init() error
func (*DataAccess) LoadAllActiveNodeGroupsDesc ¶
func (d *DataAccess) LoadAllActiveNodeGroupsDesc() (nodeGroups []scalehist.NodeGroupInfo, err error)
func (*DataAccess) LoadAllEvents ¶
func (d *DataAccess) LoadAllEvents() (events []scalehist.EventInfo, err error)
func (*DataAccess) LoadEventInfoWithUID ¶
func (d *DataAccess) LoadEventInfoWithUID(eventUID string) (eventInfo scalehist.EventInfo, err error)
func (*DataAccess) LoadEventNGAssocForEventUID ¶
func (d *DataAccess) LoadEventNGAssocForEventUID(eventUID string) (assoc scalehist.EventNodeGroupAssoc, err error)
func (*DataAccess) LoadLatestNodeGroup ¶
func (d *DataAccess) LoadLatestNodeGroup(ngName string) (ng scalehist.NodeGroupInfo, err error)
func (*DataAccess) LoadLatestPodInfoWithName ¶
func (d *DataAccess) LoadLatestPodInfoWithName(podName string) (podInfo scalehist.PodInfo, err error)
func (*DataAccess) LoadNodeGroupsWithEventUIDAndSameHash ¶
func (d *DataAccess) LoadNodeGroupsWithEventUIDAndSameHash() (nodeGroups []NodeGroupWithEventUID, err error)
func (*DataAccess) LoadNodeInfosBefore ¶
func (*DataAccess) StoreCADeployment ¶
func (d *DataAccess) StoreCADeployment(caSettings scalehist.CASettingsInfo) (int64, error)
func (*DataAccess) StoreEventCASettingsAssoc ¶
func (d *DataAccess) StoreEventCASettingsAssoc(assoc scalehist.EventCASettingsAssoc) error
func (*DataAccess) StoreEventInfo ¶
func (d *DataAccess) StoreEventInfo(event scalehist.EventInfo) error
func (*DataAccess) StoreEventNGAssoc ¶
func (d *DataAccess) StoreEventNGAssoc(assoc scalehist.EventNodeGroupAssoc) error
func (*DataAccess) StoreNodeGroup ¶
func (d *DataAccess) StoreNodeGroup(ng scalehist.NodeGroupInfo) (rowID int64, err error)
func (*DataAccess) StoreNodeInfo ¶
func (d *DataAccess) StoreNodeInfo(n scalehist.NodeInfo) (rowID int64, err error)
func (*DataAccess) StorePodInfo ¶
func (d *DataAccess) StorePodInfo(podInfo scalehist.PodInfo) (int64, error)
func (*DataAccess) UpdateLatestNodeGroupTargetSize ¶
func (d *DataAccess) UpdateLatestNodeGroupTargetSize(nodeGroupName string, targetSize int) (updated int64, err error)
func (*DataAccess) UpdateNodeGroupDeletionTimestamp ¶
func (*DataAccess) UpdateNodeInfoDeletionTimestamp ¶
func (*DataAccess) UpdatePodDeletionTimestamp ¶
type NodeGroupWithEventUID ¶
type NodeGroupWithEventUID struct { scalehist.NodeGroupInfo EventUID string `db:"EventUID"` }
Click to show internal directories.
Click to hide internal directories.