Documentation ¶
Index ¶
- Constants
- func IsPortAssigned(port int32) bool
- func IsPortInvalid(port int32) bool
- func IsPortUnassigned(port int32) bool
- func PortUnassigned() int32
- type CopyCROptions
- type CopyStatusField
- type CopyStatusFieldGroup
- type CopyStatusOptions
- type CycleAddress
- type CycleSpec
- type HostScopeAddress
- type Int32
- func (i *Int32) Equal(to *Int32) bool
- func (i *Int32) EqualValue(to *Int32) bool
- func (i *Int32) From(value int32) *Int32
- func (i *Int32) HasValue() bool
- func (i *Int32) IntValue() int
- func (i *Int32) IsValid() bool
- func (i *Int32) MergeFrom(from *Int32) *Int32
- func (i *Int32) Normalize(defaultValue int32) *Int32
- func (i *Int32) String() string
- func (i *Int32) Value() int32
- type List
- type Matchable
- type ScopeAddress
- type Status
- type String
- type StringBool
- func (s *StringBool) CastTo01(defaultValue bool) string
- func (s *StringBool) CastToStringTrueFalse(defaultValue bool) string
- func (s *StringBool) From(value bool) *StringBool
- func (s *StringBool) HasValue() bool
- func (s *StringBool) IsFalse() bool
- func (s *StringBool) IsTrue() bool
- func (s *StringBool) IsValid() bool
- func (s *StringBool) MergeFrom(from *StringBool) *StringBool
- func (s *StringBool) Normalize(defaultValue bool) *StringBool
- func (s *StringBool) String() string
- func (s *StringBool) Value() bool
- type UpdateStatusOptions
Constants ¶
const ( StringBool0 = "0" StringBool1 = "1" StringBoolFalseFirstCapital = "False" StringBoolFalseLowercase = "false" StringBoolTrueFirstCapital = "True" StringBoolTrueLowercase = "true" StringBoolNoFirstCapital = "No" StringBoolNoLowercase = "no" StringBoolYesFirstCapital = "Yes" StringBoolYesLowercase = "yes" StringBoolOffFirstCapital = "Off" StringBoolOffLowercase = "off" StringBoolOnFirstCapital = "On" StringBoolOnLowercase = "on" StringBoolDisableFirstCapital = "Disable" StringBoolDisableLowercase = "disable" StringBoolEnableFirstCapital = "Enable" StringBoolEnableLowercase = "enable" StringBoolDisabledFirstCapital = "Disabled" StringBoolDisabledLowercase = "disabled" StringBoolEnabledFirstCapital = "Enabled" StringBoolEnabledLowercase = "enabled" )
Set of string boolean constants
const ( // PortMayBeAssignedLaterOrLeftUnused value means that port // is not assigned yet and is expected to be assigned later. PortMayBeAssignedLaterOrLeftUnused = int32(0) )
Variables ¶
This section is empty.
Functions ¶
func IsPortAssigned ¶
IsPortAssigned checks whether port is assigned
func IsPortInvalid ¶
IsPortInvalid checks whether port is invalid
func IsPortUnassigned ¶
IsPortUnassigned checks whether port is unassigned
Types ¶
type CopyCROptions ¶
type CopyCROptions struct { // SkipStatus specifies whether to copy status SkipStatus bool // SkipManagedFields specifies whether to copy managed fields SkipManagedFields bool }
CopyCROptions specifies options for custom resource copier
type CopyStatusField ¶
type CopyStatusFieldGroup ¶
type CopyStatusOptions ¶
type CopyStatusOptions struct { CopyStatusFieldGroup CopyStatusField }
CopyStatusOptions specifies what parts to copy in status
type CycleAddress ¶
type CycleAddress struct { // CycleIndex specifies index of the cycle within something bigger CycleIndex int // Index specifies index within the cycle Index int }
CycleAddress defines cycle address of an entity
func NewCycleAddress ¶
func NewCycleAddress() *CycleAddress
NewCycleAddress creates new CycleAddress
func (*CycleAddress) Inc ¶
func (s *CycleAddress) Inc(spec *CycleSpec)
Inc increases the CycleAddress
type CycleSpec ¶
type CycleSpec struct { // Size specifies size of a cycle Size int }
CycleSpec defines spec of a cycle, such as size
type HostScopeAddress ¶
type HostScopeAddress struct { // CRScopeAddress specifies address of a host within CHI scope CRScopeAddress *ScopeAddress // ClusterScopeAddress specifies address of a host within cluster scope ClusterScopeAddress *ScopeAddress // ClusterIndex specifies index of a cluster within CHI ClusterIndex int // ShardIndex specifies index of a shard within cluster ShardIndex int // ReplicaIndex specifies index of a replica within cluster ReplicaIndex int }
HostScopeAddress specifies address of a host
func NewHostScopeAddress ¶
func NewHostScopeAddress(crScopeCycleSize, clusterScopeCycleSize int) (a *HostScopeAddress)
NewHostScopeAddress creates new HostScopeAddress
type Int32 ¶
type Int32 int32
Int32 defines int32 representation with possibility to be optional
func EnsurePortValue ¶
EnsurePortValue ensures port either: - already has own value assigned - or has provided value - or value is fell back to default
func (*Int32) EqualValue ¶
EqualValue checks whether has equal values
type Matchable ¶
type Matchable string
Matchable defines string that can be matched against another string
type ScopeAddress ¶
type ScopeAddress struct { // CycleSpec specifies cycle which to be used to specify CycleAddress CycleSpec *CycleSpec // CycleAddress specifies CycleAddress within the scope CycleAddress *CycleAddress // Index specifies index within the scope Index int }
ScopeAddress defines scope address of an entity
func NewScopeAddress ¶
func NewScopeAddress(cycleSize int) *ScopeAddress
NewScopeAddress creates new ScopeAddress
type Status ¶
type Status struct { CHOpVersion bool CHOpCommit bool CHOpDate bool CHOpIP bool ClustersCount bool ShardsCount bool ReplicasCount bool HostsCount bool Status bool TaskID bool TaskIDsStarted bool TaskIDsCompleted bool Action bool Actions bool Error bool Errors bool HostsUpdatedCount bool HostsAddedCount bool HostsUnchangedCount bool HostsFailedCount bool HostsCompletedCount bool HostsDeletedCount bool HostsDeleteCount bool Pods bool PodIPs bool FQDNs bool Endpoint bool NormalizedCR bool NormalizedCRCompleted bool HostsWithTablesCreated bool UsedTemplates bool }
type String ¶
type String string
String defines string representation with possibility to be optional
type StringBool ¶
type StringBool string
StringBool defines string representation of a bool type
func NewStringBool ¶
func NewStringBool(value ...bool) *StringBool
NewStringBool creates new StringBool variable with optional value
func (*StringBool) CastTo01 ¶
func (s *StringBool) CastTo01(defaultValue bool) string
CastTo01 casts string-bool into string "0"/"1"
func (*StringBool) CastToStringTrueFalse ¶
func (s *StringBool) CastToStringTrueFalse(defaultValue bool) string
CastToStringTrueFalse casts string-bool into string "true"/"false"
func (*StringBool) From ¶
func (s *StringBool) From(value bool) *StringBool
From casts bool to a StringBool
func (*StringBool) HasValue ¶
func (s *StringBool) HasValue() bool
HasValue checks whether value is specified
func (*StringBool) IsFalse ¶
func (s *StringBool) IsFalse() bool
IsFalse checks whether str is a string as bool "false" value
func (*StringBool) IsTrue ¶
func (s *StringBool) IsTrue() bool
IsTrue checks whether str is a string as bool "true" value
func (*StringBool) IsValid ¶
func (s *StringBool) IsValid() bool
IsValid checks whether StringBool has a proper value
func (*StringBool) MergeFrom ¶
func (s *StringBool) MergeFrom(from *StringBool) *StringBool
MergeFrom merges value from another variable
func (*StringBool) Normalize ¶
func (s *StringBool) Normalize(defaultValue bool) *StringBool
Normalize normalizes StringBool value with fallback to defaultValue in case initial value is incorrect
func (*StringBool) String ¶
func (s *StringBool) String() string
String casts StringBool to a string
type UpdateStatusOptions ¶
type UpdateStatusOptions struct { CopyStatusOptions TolerateAbsence bool }
UpdateStatusOptions defines how to update CHI status