utils

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const EthUnbond = "ethereum-unbond" //flushes every 3 days
View Source
const GroupEthUnbond = "group-ethereum-unbond"
View Source
const GroupMsgDelegate = "group-msg-delegate"
View Source
const GroupMsgSend = "group-msg-send"
View Source
const GroupMsgUnbond = "group-msg-unbond"
View Source
const GroupRedelegate = "group-redelegate"
View Source
const GroupRetryTendermint = "group-retry-tendermint"
View Source
const GroupToEth = "group-to-ethereum"
View Source
const GroupToTendermint = "group-to-tendermint"
View Source
const MsgDelegate = "msg-delegate" //priority2
View Source
const MsgSend = "msg-send" //priority3
View Source
const MsgUnbond = "msg-unbond" //priority1
View Source
const Redelegate = "redelegate"
View Source
const RetryTendermint = "retry-tendermint"
View Source
const ToEth = "to-ethereum"
View Source
const ToTendermint = "to-tendermint"

Variables

Topics : is list of topics

Functions

func KafkaAdmin

func KafkaAdmin(kafkaPorts []string, config *sarama.Config) sarama.ClusterAdmin

KafkaAdmin : is admin to create topics

func NewConsumerGroup

func NewConsumerGroup(kafkaPorts []string, groupID string, config *sarama.Config) sarama.ConsumerGroup

func NewProducer

func NewProducer(kafkaPorts []string, config *sarama.Config) sarama.SyncProducer

NewProducer is a producer to send messages to kafka

func ProducerDeliverMessage

func ProducerDeliverMessage(msgBytes []byte, topic string, producer sarama.SyncProducer) error

ProducerDeliverMessage : delivers messages to kafka

func SaramaConfig

func SaramaConfig() *sarama.Config

func TopicsInit

func TopicsInit(admin sarama.ClusterAdmin, topic string, topicDetail sarama.TopicDetail)

TopicsInit : is needed to initialise topics

Types

type KafkaState

type KafkaState struct {
	HomeDir       string
	Admin         sarama.ClusterAdmin
	ConsumerGroup map[string]sarama.ConsumerGroup
	Producer      sarama.SyncProducer
	Topics        []string
}

KafkaState : is a struct showing the state of kafka

func NewKafkaState

func NewKafkaState(kafkaPorts []string, homeDir string, topicDetail sarama.TopicDetail) KafkaState

NewKafkaState : returns a kafka state

Jump to

Keyboard shortcuts

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