topic

package
v0.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RetentionMsKey   = "retention.ms"
	RetentionSizeKey = "retention.bytes"
	PartitionsKey    = "partitions"
	CleanupPolicy    = "cleanup.policy"
)
View Source
var ValidCleanupPolicies = []string{"delete", "compact", "compact,delete"}

Functions

func ConvertPartitionsToInt

func ConvertPartitionsToInt(partitionStr string) (int32, error)

ConvertPartitionsToInt converts the value from "partitions" to int32

func ConvertRetentionBytesToInt

func ConvertRetentionBytesToInt(retentionBytesStr string) (int, error)

ConvertRetentionBytesToInt converts the value from "retention-bytes" to int

func ConvertRetentionMsToInt

func ConvertRetentionMsToInt(retentionMsStr string) (int, error)

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
	CurPartitions int
}

Validator is a type for validating Kafka topic configuration values

func (*Validator) ValidateMessageRetentionPeriod added in v0.25.0

func (v *Validator) ValidateMessageRetentionPeriod(val interface{}) error

ValidateMessageRetentionPeriod validates the value (ms) of the retention period the valid values can range from [-1,...]

func (*Validator) ValidateMessageRetentionSize added in v0.25.0

func (v *Validator) ValidateMessageRetentionSize(val interface{}) error

ValidateMessageRetentionSize validates the value (bytes) of the retention size the valid values can range from [-1,...]

func (*Validator) ValidateName added in v0.25.0

func (v *Validator) ValidateName(val interface{}) error

ValidateName validates the name of the topic

func (*Validator) ValidateNameIsAvailable added in v0.25.0

func (v *Validator) ValidateNameIsAvailable(val interface{}) error

ValidateNameIsAvailable checks if a topic with the given name already exists

func (*Validator) ValidatePartitionsN added in v0.25.0

func (v *Validator) ValidatePartitionsN(val interface{}) error

ValidatePartitionsN performs validation on the number of partitions v

func (*Validator) ValidateSearchInput added in v0.25.0

func (v *Validator) ValidateSearchInput(val interface{}) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL