Documentation ¶
Index ¶
- Constants
- Variables
- func Configure(kafkaBrokerUrls []string, clientId string, topic string) (w *kafka.Writer, err error)
- func ConnKafka() (err error)
- func CreateKafkaTopic(topicName string, numPartitions int, replicationFactor int, ...) (err error)
- func EtcdConnect() (*clientv3.Client, error)
- func GetKafkaReader(topic, consumerGroupName string, offsetMode int64) *kafka.Reader
- func NewConnection(url string, opts ...nats.Option) (*nats.Conn, error)
- func SetupConnOptions(opts []nats.Option) []nats.Option
Constants ¶
View Source
const ( LastOffset int64 = -1 FirstOffset int64 = -2 )
Variables ¶
View Source
var (
ConnectEtcd *clientv3.Client
)
View Source
var (
KafkaConn *kafka.Conn
)
Functions ¶
func CreateKafkaTopic ¶
func CreateKafkaTopic(topicName string, numPartitions int, replicationFactor int, retentionTime string) (err error)
CreateKafkaTopicIfNotExist will create kafka topic if not exist If Topic exist Already it will not effect existing one
func GetKafkaReader ¶
GetKafkaReader reader object for consumption
func NewConnection ¶
NewConnection nats connection
func SetupConnOptions ¶
func SetupConnOptions(opts []nats.Option) []nats.Option
SetupConnOptions setup connection options
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.