add creating method for PostgresStatus
This commit is contained in:
		
							parent
							
								
									b9d5cfe6b8
								
							
						
					
					
						commit
						24559e42d1
					
				|  | @ -96,6 +96,11 @@ func (postgresStatus PostgresStatus) Running() bool { | ||||||
| 	return postgresStatus.PostgresClusterStatus == ClusterStatusRunning | 	return postgresStatus.PostgresClusterStatus == ClusterStatusRunning | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | // Creating status of cluster
 | ||||||
|  | func (postgresStatus PostgresStatus) Creating() bool { | ||||||
|  | 	return postgresStatus.PostgresClusterStatus == ClusterStatusCreating | ||||||
|  | } | ||||||
|  | 
 | ||||||
| func (postgresStatus PostgresStatus) String() string { | func (postgresStatus PostgresStatus) String() string { | ||||||
| 	return fmt.Sprintf(`status=%s`, postgresStatus.PostgresClusterStatus) | 	return fmt.Sprintf(`status=%s`, postgresStatus.PostgresClusterStatus) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -173,7 +173,7 @@ func (c *Cluster) setStatus(status string) { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func (c *Cluster) isNewCluster() bool { | func (c *Cluster) isNewCluster() bool { | ||||||
| 	return c.Status.PostgresClusterStatus == acidv1.ClusterStatusCreating | 	return c.Status.Creating() | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // initUsers populates c.systemUsers and c.pgUsers maps.
 | // initUsers populates c.systemUsers and c.pgUsers maps.
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue