Documentation ¶
Index ¶
- Variables
- func ConvertPartitionsToInt(partitionStr string) (int32, error)
- func ConvertRetentionBytesToInt(retentionBytesStr string) (int, error)
- func ConvertRetentionMsToInt(retentionMsStr string) (int, error)
- func CreateConfigEntries(entryMap map[string]*string) *[]kafkainstanceclient.ConfigEntry
- func GetConfigValue(configEntries []kafkainstanceclient.ConfigEntry, keyName string) (val string)
- type Validator
- func (v *Validator) ValidateMessageRetentionPeriod(val interface{}) error
- func (v *Validator) ValidateMessageRetentionSize(val interface{}) error
- func (v *Validator) ValidateName(val interface{}) error
- func (v *Validator) ValidateNameIsAvailable(val interface{}) error
- func (v *Validator) ValidatePartitionsN(val interface{}) error
- func (v *Validator) ValidateSearchInput(val interface{}) error
Constants ¶
This section is empty.
Variables ¶
var ( RetentionMsKey = "retention.ms" RetentionSizeKey = "retention.bytes" PartitionsKey = "partitions" CleanupPolicy = "cleanup.policy" )
var ValidCleanupPolicies = []string{"delete", "compact", "compact,delete"}
Functions ¶
func ConvertPartitionsToInt ¶
ConvertPartitionsToInt converts the value from "partitions" to int32
func ConvertRetentionBytesToInt ¶
ConvertRetentionBytesToInt converts the value from "retention-bytes" to int
func ConvertRetentionMsToInt ¶
ConvertRetentionMsToInt converts the value from "retention-ms" to int
func CreateConfigEntries ¶
func CreateConfigEntries(entryMap map[string]*string) *[]kafkainstanceclient.ConfigEntry
CreateConfigEntries converts a key value map of config entries to an array of config entries
func GetConfigValue ¶ added in v0.25.0
func GetConfigValue(configEntries []kafkainstanceclient.ConfigEntry, keyName string) (val string)
Types ¶
type Validator ¶ added in v0.25.0
type Validator struct { Localizer localize.Localizer InstanceID string Connection factory.ConnectionFunc }
Validator is a type for validating Kafka topic configuration values
func (*Validator) ValidateMessageRetentionPeriod ¶ added in v0.25.0
ValidateMessageRetentionPeriod validates the value (ms) of the retention period the valid values can range from [-1,...]
func (*Validator) ValidateMessageRetentionSize ¶ added in v0.25.0
ValidateMessageRetentionSize validates the value (bytes) of the retention size the valid values can range from [-1,...]
func (*Validator) ValidateName ¶ added in v0.25.0
ValidateName validates the name of the topic
func (*Validator) ValidateNameIsAvailable ¶ added in v0.25.0
ValidateNameIsAvailable checks if a topic with the given name already exists
func (*Validator) ValidatePartitionsN ¶ added in v0.25.0
ValidatePartitionsN performs validation on the number of partitions v