custom

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SidecarHost     = "localhost"      // The Host name used when making requests to the K8S sidecar.
	SidecarPort     = "8888"           // The HTTP port on which the sidecar must be listening for POST / DELETE requests.
	TopicsPath      = "/topics"        // The HTTP request path for Kafka Topic creation / deletion to be implemented by the sidecar.
	TopicNameHeader = "Slug"           // The HTTP Header key used to identify the TopicName in the POST request.
	SidecarTimeout  = 30 * time.Second // How long to wait for the sidecar's server to respond.
)

Custom REST Sidecar Constants

NOTE - These are expected to be used by third-party implementers of

custom sidecars, do not remove due to "unused" status in IDE!

Variables

This section is empty.

Functions

This section is empty.

Types

type TopicDetail

type TopicDetail struct {
	NumPartitions     int32              `json:"numPartitions"`
	ReplicationFactor int16              `json:"replicationFactor"`
	ReplicaAssignment map[int32][]int32  `json:"replicaAssignment,omitempty"`
	ConfigEntries     map[string]*string `json:"configEntries,omitempty"`
}

Custom TopicDetail Struct

func NewTopicDetail

func NewTopicDetail(numPartitions int32, replicationFactor int16, replicaAssignment map[int32][]int32, configEntries map[string]*string) *TopicDetail

Custom TopicDetail Constructor

func (*TopicDetail) FromSaramaTopicDetail

func (c *TopicDetail) FromSaramaTopicDetail(topicDetail *sarama.TopicDetail)

Convert A Sarama TopicDetail To The Current Custom TopicDetail

func (*TopicDetail) ToSaramaTopicDetail

func (c *TopicDetail) ToSaramaTopicDetail() *sarama.TopicDetail

Convert The Current Custom TopicDetail To A Sarama TopicDetail

Jump to

Keyboard shortcuts

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