Documentation
¶
Index ¶
- Variables
- func WithCleanupPolicy(policy string) option
- func WithCompressionType(compression string) option
- func WithDeleteRetentionDur(dur time.Duration) option
- func WithKV(key, value string) option
- func WithMinCleanableDirtyRatio(ratio float64) option
- func WithRetentionDur(dur time.Duration) option
- func WithSegmentDur(dur time.Duration) option
- type Schema
Constants ¶
This section is empty.
Variables ¶
var ErrBadConfiguration = errors.New("bad configuration")
Functions ¶
func WithCleanupPolicy ¶
func WithCleanupPolicy(policy string) option
WithCleanupPolicy set cleanup policy.
func WithCompressionType ¶
func WithCompressionType(compression string) option
func WithDeleteRetentionDur ¶
WithDeleteRetentionDur надгробия удаленных сообщений будут находиться в топике как минимум dur. Далее - могут быть удалены.
func WithKV ¶
func WithKV(key, value string) option
WithKV проверит только ключ на его "известность" в документации. В случае если вы хотите добавить неизвестную опцию - используйте схему FromRawMap.
func WithMinCleanableDirtyRatio ¶
func WithMinCleanableDirtyRatio(ratio float64) option
WithMinCleanableDirtyRatio допускается минимум (ratio * 100)% дубликатов в логе. Влияет на частоту удаления сегментов. Пока порог не превышен - чистка не начнется.
func WithRetentionDur ¶
WithRetentionDur сообщение будет точно находиться в логе как минимум dur времени. Далее - может быть удалено.
func WithSegmentDur ¶
WithSegmentDur каждый dur кафка будет принудительно создавать новый сегмент на диске. Удаление может производиться только по-сегментно.
Types ¶
type Schema ¶
type Schema struct {
// contains filtered or unexported fields
}
Schema describe a topic schema. Just keep all topic parameters.
func FromRawMap ¶
FromRawMap create a config from raw map without any validation.
func ServerDefault ¶
func ServerDefault() *Schema
ServerDefault returns default server-defined schema. With this schema you will create a topic with default configuration like with command: