create

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Partition

func Partition(ctx *gin.Context)

Partition create consumer groups

func Topic

func Topic(ctx *gin.Context)

Topic create kafka topic

Types

type PartitionRequest

type PartitionRequest struct {
	Topic          string `json:"topic"           form:"topic"           binding:"required"` //topic name
	Brokers        string `json:"brokers"         form:"brokers"         binding:"required"` //kafka brokers
	TotalPartition int    `json:"total_partition" form:"total_partition" binding:"required"` //total partition count, 1~100
}

PartitionRequest request

type PartitionResponse

type PartitionResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error,omitempty"`
}

PartitionResponse response

type TopicRequest

type TopicRequest struct {
	Topic          string `json:"topic"            form:"topic"            binding:"required"` //topic name
	Brokers        string `json:"brokers"          form:"brokers"          binding:"required"` //kafka brokers
	PartitionCount int    `json:"partition_count"  form:"partition_count"`                     //partition count, 1~100, default 1 partition
	ReplicaCount   int    `json:"replica_count"    form:"replica_count"`                       //replica count, 1~100, default 1 replica , no HA
	RetentionTime  int    `json:"retention_time"   form:"retention_time"`                      //message retention time (second), 0~2592000, default 259200 second (3 day).
}

TopicRequest request

type TopicResponse

type TopicResponse struct {
	Success bool   `json:"success"`
	Error   string `json:"error,omitempty"`
}

TopicResponse response

Jump to

Keyboard shortcuts

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