Documentation ¶
Index ¶
- Constants
- Variables
- func BaseVersion(ver string) (string, error)
- func Init(log logr.Logger, schemaDir string) error
- func InitFromMap(log logr.Logger, schemaMap map[string]string)
- func IsSupportedVersion(ver string) (bool, error)
- func PluralOf(noun string) string
- func SingularOf(noun string) string
- type AsConfig
- type CfgValue
- type Conf
- type ConfGetter
- type DotConf
- type GenConf
- type GetConfigStep
- type GetFlatSchemaStep
- type ServerVersionCheckStep
- type ValidationErr
Constants ¶
const ( FSPATH sysproptype = "FSPATH" NETADDR sysproptype = "NETADDR" DEVICE sysproptype = "DEVICE" NONE sysproptype = "NONE" )
types of system properties
Variables ¶
var ErrConfigKeyInvalid = fmt.Errorf("invalid config key")
ErrConfigKeyInvalid is invalid config key error
var ErrConfigParse = fmt.Errorf("config parse error")
ErrConfigParse is config parse error
var ErrConfigSchema = fmt.Errorf("config schema error")
ErrConfigSchema is config schema error
var ErrConfigTransformUnsupported = fmt.Errorf("unsupported config transform")
ErrConfigTransformUnsupported is unsupported config transform
var ErrConfigVersionInvalid = fmt.Errorf("invalid config version")
ErrConfigVersionInvalid is invalid config version
var ErrConfigVersionUnsupported = fmt.Errorf("unsupported config version")
ErrConfigVersionUnsupported is unsupported config version
Functions ¶
func BaseVersion ¶
BaseVersion returns base-version for ver
func Init ¶
Init initializes aerospike schemas. Init needs to be called before using this package.
schemaDir is the path to directory having the aerospike config schemas.
func InitFromMap ¶
InitFromMap init schema map from a map. Map key format -> 4.1.0 Map value format -> string of json schema
func IsSupportedVersion ¶
IsSupportedVersion returns true if version supported else false
func SingularOf ¶
SingularOf returns the singular of the input noun.
Types ¶
type AsConfig ¶
type AsConfig struct {
// contains filtered or unexported fields
}
AsConfig is wrapper over Conf
func FromConfFile ¶
FromConfFile unmarshales the aerospike config text in "in" into a new *AsConfig
func NewMapAsConfig ¶
NewMapAsConfig creates AsConfig. Typically an unmarshalled yaml file is passed in
func (*AsConfig) GetFlatMap ¶
GetFlatMap returns a pointer to the copy of the flattened config stored in cfg
type Conf ¶
Conf is format for configs It has list for named sections like namespace, set, dc, tls, logging file
type ConfGetter ¶ added in v1.1.0
ConfGetter is an interface that defines methods for retrieving configurations.
type GenConf ¶ added in v1.1.0
func GenerateConf ¶ added in v1.1.0
GenerateConf generates the config based on the provided log and ConfGetter. If removeDefaults is true, it will remove default values from the config. Without removeDefaults, the config that is generate will not be valid. Many default values are out of the acceptable range required by the server.
type GetConfigStep ¶ added in v1.1.0
type GetConfigStep struct {
// contains filtered or unexported fields
}
GetConfigStep is a pipeline step that retrieves the configs and metadata.
type GetFlatSchemaStep ¶ added in v1.1.0
type GetFlatSchemaStep struct {
// contains filtered or unexported fields
}
GetFlatSchema
type ServerVersionCheckStep ¶ added in v1.1.0
type ServerVersionCheckStep struct {
// contains filtered or unexported fields
}
ServerVersionCheckStep is a pipeline step that checks if the server version is supported.