sla

package
v0.0.0-...-077b43f Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Package sla provides the SLA definitions for topics.

Warded topic has 2 extra topics: {appid}.{topic}.retry.{ver} {appid}.{topic}.dead.{ver}

Index

Constants

View Source
const (
	SlaKeyRetentionHours = "retention.hours"
	SlaKeyRetentionBytes = "retention.bytes"
	SlaKeyPartitions     = "partitions"
	SlaKeyReplicas       = "replicas"

	SlaKeyRetryTopic      = "retry"
	SlaKeyDeadLetterTopic = "dead"
)

Variables

View Source
var (
	ErrNegative         = errors.New("can not be negative")
	ErrEmptyArg         = errors.New("empty argument")
	ErrNotNumber        = errors.New("not number")
	ErrTooBigPartitions = errors.New("too big partitions")
)

Functions

func ValidateShadowName

func ValidateShadowName(name string) bool

Types

type TopicSla

type TopicSla struct {
	RetentionHours    float64
	RetentionBytes    int
	Partitions        int
	Replicas          int
	MinInsyncReplicas int
}

func DefaultSla

func DefaultSla() *TopicSla

func (*TopicSla) DumpForAlterTopic

func (this *TopicSla) DumpForAlterTopic() []string

func (*TopicSla) DumpForCreateTopic

func (this *TopicSla) DumpForCreateTopic() []string

Dump the sla for kafka-topics.sh as arguments.

func (*TopicSla) IsDefault

func (this *TopicSla) IsDefault() bool

func (*TopicSla) ParseRetentionHours

func (this *TopicSla) ParseRetentionHours(s string) error

func (*TopicSla) Validate

func (this *TopicSla) Validate() error

Jump to

Keyboard shortcuts

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