Address code review

This commit is contained in:
Sergey Dudoladov 2019-01-08 11:17:00 +01:00
parent b20a484e4e
commit b50587cc2c
5 changed files with 7 additions and 7 deletions

View File

@ -97,7 +97,7 @@ type AWSGCPConfiguration struct {
KubeIAMRole string `json:"kube_iam_role,omitempty"` KubeIAMRole string `json:"kube_iam_role,omitempty"`
} }
// OperatorDebugConfiguration defines the configration of debug // OperatorDebugConfiguration defines options for the debug mode
type OperatorDebugConfiguration struct { type OperatorDebugConfiguration struct {
DebugLogging bool `json:"debug_logging,omitempty"` DebugLogging bool `json:"debug_logging,omitempty"`
EnableDBAccess bool `json:"enable_database_access,omitempty"` EnableDBAccess bool `json:"enable_database_access,omitempty"`
@ -123,7 +123,7 @@ type LoggingRESTAPIConfiguration struct {
ClusterHistoryEntries int `json:"cluster_history_entries,omitempty"` ClusterHistoryEntries int `json:"cluster_history_entries,omitempty"`
} }
// ScalyrConfiguration defines the configration of ScalyrAPI // ScalyrConfiguration defines the configuration for ScalyrAPI
type ScalyrConfiguration struct { type ScalyrConfiguration struct {
ScalyrAPIKey string `json:"scalyr_api_key,omitempty"` ScalyrAPIKey string `json:"scalyr_api_key,omitempty"`
ScalyrImage string `json:"scalyr_image,omitempty"` ScalyrImage string `json:"scalyr_image,omitempty"`

View File

@ -16,7 +16,7 @@ const (
var ( var (
// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
// SchemeBuilder is runtime.SchemeBuilder // An instance of runtime.SchemeBuilder, global for this package
SchemeBuilder runtime.SchemeBuilder SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder localSchemeBuilder = &SchemeBuilder
//AddToScheme is localSchemeBuilder.AddToScheme //AddToScheme is localSchemeBuilder.AddToScheme

View File

@ -84,7 +84,7 @@ func validateCloneClusterDescription(clone *CloneDescription) error {
return nil return nil
} }
// Success of the last operation on a Postgres cluster // Success of the current Status
func (status PostgresStatus) Success() bool { func (status PostgresStatus) Success() bool {
return status != ClusterStatusAddFailed && return status != ClusterStatusAddFailed &&
status != ClusterStatusUpdateFailed && status != ClusterStatusUpdateFailed &&

View File

@ -21,7 +21,7 @@ const (
Replica PostgresRole = "replica" Replica PostgresRole = "replica"
) )
// PodEventType describes value of event type // PodEventType represents the type of a pod-related event
type PodEventType string type PodEventType string
// Possible values for the EventType // Possible values for the EventType

View File

@ -17,10 +17,10 @@ type Ticker struct {
ticker *time.Ticker ticker *time.Ticker
} }
// Stop returns ticker.Stop // Stop is a convenience wrapper around ticker.Stop
func (t *Ticker) Stop() { t.ticker.Stop() } func (t *Ticker) Stop() { t.ticker.Stop() }
// Tick returns ticker.C // Tick is a convenience wrapper around ticker.C
func (t *Ticker) Tick() { <-t.ticker.C } func (t *Ticker) Tick() { <-t.ticker.C }
// Retry is a wrapper around RetryWorker that provides a real RetryTicker // Retry is a wrapper around RetryWorker that provides a real RetryTicker