Documentation ¶
Index ¶
- Constants
- Variables
- func FillMsgs(ctx sdk.Context, key string, msg interface{})
- func GetFileName(dir string, fileIndex int) string
- func GetFilePathAndFileIndexFromDir(dir string, maxFileSize int) (filePath string, fileIndex int, err error)
- func GetFileSize(filePath string) int
- func Retry(attempts int, sleep time.Duration, fn func() error) error
- func SetMkFifoFunc(mkFifo MkFifoFunc)
- type MkFifoFunc
- type MsgSender
- type MsgWriter
Constants ¶
View Source
const ( FlagBrokers = "brokers" FlagTopics = "subscribe-modules" FlagFeatureToggle = "feature-toggle" KafkaPubTopic = "coinex-dex" )
View Source
const ( CfgPrefixFile = "file:" CfgPrefixKafka = "kafka:" CfgPrefixOS = "os:" CfgPrefixDir = "dir:" CfgNamedPipe = "pipe:" )
View Source
const RetryNum = math.MaxInt64
Variables ¶
View Source
var (
EventTypeMsgQueue = "kafka"
)
View Source
var MaxFileSize = 1024 * 1024 * 100
Functions ¶
func GetFileName ¶
func GetFileSize ¶
func SetMkFifoFunc ¶
func SetMkFifoFunc(mkFifo MkFifoFunc)
Types ¶
type MkFifoFunc ¶
type MsgSender ¶
type MsgSender interface { SendMsg(key []byte, v []byte) IsSubscribed(topic string) bool IsOpenToggle() bool GetMode() []string Close() }
func NewProducer ¶
type MsgWriter ¶
func NewDirMsgWriter ¶
func NewFileMsgWriter ¶
func NewKafkaMsgWriter ¶
func NewNopMsgWriter ¶
func NewNopMsgWriter() MsgWriter
func NewPipeMsgWriter ¶
func NewStdOutMsgWriter ¶
func NewStdOutMsgWriter() MsgWriter
Click to show internal directories.
Click to hide internal directories.