Documentation
¶
Index ¶
- Constants
- Variables
- func CompareVersions(version1, version2 string) (int, error)
- func CompareVersionsIgnoreRevision(version1, version2 string) (int, error)
- func DeepCopy(src interface{}) interface{}
- func ToString(sv interface{}) (string, error)
- type InfoParser
- type Stats
- func (s Stats) AggregateStats(other Stats)
- func (s Stats) Clone() Stats
- func (s Stats) DeepClone() Stats
- func (s Stats) Del(names ...string)
- func (s Stats) ExistsGet(name string) (interface{}, bool)
- func (s Stats) FindKeyPath(del, key string) []string
- func (s Stats) FindKeysPath(del string, keys ...string) map[string][]string
- func (s Stats) Flatten(sep string) Stats
- func (s Stats) Get(name string, aliases ...string) interface{}
- func (s Stats) GetInnerVal(keys ...string) Stats
- func (s Stats) GetMulti(names ...string) Stats
- func (s Stats) GetRaw(keys ...string) interface{}
- func (s Stats) Int(name string, aliases ...string) int64
- func (s Stats) Len() int
- func (s Stats) ToParsedValues() map[string]interface{}
- func (s Stats) ToStringValues() map[string]interface{}
- func (s Stats) TryFloat(name string, defValue float64, aliases ...string) float64
- func (s Stats) TryInt(name string, defValue int64, aliases ...string) int64
- func (s Stats) TryList(name string, aliases ...string) []string
- func (s Stats) TryStats(name string, aliases ...string) Stats
- func (s Stats) TryStatsList(name string, aliases ...string) []Stats
- func (s Stats) TryString(name string, defValue string, aliases ...string) string
- func (s Stats) TryStringP(name string, defValue string, aliases ...string) *string
- type StatsBy
- type SyncStats
- func (s *SyncStats) AggregateStatsTo(other Stats)
- func (s *SyncStats) Clone() Stats
- func (s *SyncStats) CloneInto(res Stats)
- func (s *SyncStats) Del(names ...string)
- func (s *SyncStats) Exists(name string) bool
- func (s *SyncStats) ExistsGet(name string) (interface{}, bool)
- func (s *SyncStats) Get(name string, aliases ...string) interface{}
- func (s *SyncStats) GetMulti(names ...string) Stats
- func (s *SyncStats) Int(name string, aliases ...string) int64
- func (s *SyncStats) Set(name string, value interface{})
- func (s *SyncStats) SetStats(info Stats)
- func (s *SyncStats) TryFloat(name string, defValue float64, aliases ...string) float64
- func (s *SyncStats) TryInt(name string, defValue int64, aliases ...string) int64
- func (s *SyncStats) TryString(name string, defValue string, aliases ...string) string
Constants ¶
const NotAvailable = "N/A"
const NotSupported = "N/S"
Variables ¶
var ByFloatField = func(fieldName string, p1, p2 Stats) bool {
return p1.TryFloat(fieldName, 0) < p2.TryFloat(fieldName, 0)
}
var ByIntField = func(fieldName string, p1, p2 Stats) bool {
return p1.TryInt(fieldName, 0) < p2.TryInt(fieldName, 0)
}
var ByStringField = func(fieldName string, p1, p2 Stats) bool {
return p1.TryString(fieldName, "") < p2.TryString(fieldName, "")
}
Functions ¶
func CompareVersions ¶
CompareVersions compares Aerospike Server versions if version1 == version2 returns 0 else if version1 < version2 returns -1 else returns 1
func CompareVersionsIgnoreRevision ¶
CompareVersionsIgnoreRevision compares Aerospike Server versions ignoring revisions and builds. if version1 == version2 returns 0 else if version1 < version2 returns -1 else returns 1
Types ¶
type InfoParser ¶
func NewInfoParser ¶
func NewInfoParser(s string) *InfoParser
func (*InfoParser) Expect ¶
func (ip *InfoParser) Expect(s string) error
func (*InfoParser) PeekAndExpect ¶
func (ip *InfoParser) PeekAndExpect(s string) error
PeekAndExpect checks if the expected value is present without advancing the reader
type Stats ¶
type Stats map[string]interface{}
func ToStatsDeep ¶
func (Stats) AggregateStats ¶
AggregateStats Value should be a float64 or a convertible string this function never panics
func (Stats) FindKeyPath ¶
func (Stats) FindKeysPath ¶
func (Stats) GetInnerVal ¶
GetInnerVal will give inner map from a nested map, not the base field. By using this we can get the map at any level. if this map is the lowermost then there are other TryString type calls which can be used to further get any specific type of base field
func (Stats) Int ¶
Int returns in64 value of a field after asserting value is an int64 and exists otherwise panics
func (Stats) ToParsedValues ¶
ToParsedValues Type should be map[string]interface{} otherwise same map is returned. info_parser needs parsed values
func (Stats) ToStringValues ¶
func (Stats) TryFloat ¶
TryFloat returns float64 value of a field after asserting it is float64 or a convertible string otherwise defValue is returned.
func (Stats) TryInt ¶
TryInt - Value should be an int64 or a convertible string; otherwise defValue is returned this function never panics
type StatsBy ¶
StatsBy is the type of "less" function that defines the ordering of its Stats arguments.
func (StatsBy) SortReverse ¶
type SyncStats ¶
type SyncStats struct {
// contains filtered or unexported fields
}
func NewSyncStats ¶
func (*SyncStats) AggregateStatsTo ¶
AggregateStatsTo Value should be a float64 or a convertible string this function never panics
func (*SyncStats) Int ¶
Int Value MUST exist, and MUST be an int64 or a convertible string. Panics if the above constraints are not met
func (*SyncStats) TryFloat ¶
TryFloat Value should be a float64 or a convertible string; otherwise defValue is/returned this function never panics