kafkamsgbatch

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package kafkamsgbatch

----------------develop info----------------

@Author xunmuhuang@rastar.com
@DateTime 2025-1-8 17:19

--------------------------------------------

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaMsg

type KafkaMsg struct {
	Topic string
	Key   string
	Msg   []byte
}

type SliceMsgBatch

type SliceMsgBatch struct {
	// contains filtered or unexported fields
}

func NewSliceMsgBatch

func NewSliceMsgBatch(len int) *SliceMsgBatch

NewSliceMsgBatch

@Description:获取一个实例
@param len int
@return *SliceMsgBatch

----------------develop info----------------

@Author:		xunmuhuang@rastar.com
@DateTime:		2025-01-08 17:29:46

--------------------------------------------

func (*SliceMsgBatch) Filter

func (a *SliceMsgBatch) Filter(uuid string) bool

Filter

@Description: 过滤单条
@receiver: a *SliceMsgBatch
@receiver a
@param uuid string
@return bool

----------------develop info----------------

@Author:		huang_calvin@163.com
@DateTime:		2024-09-08 14:58:35

--------------------------------------------

func (*SliceMsgBatch) FilterMulti

func (a *SliceMsgBatch) FilterMulti(filter []string) []string

FilterMulti

@Description: 批量过滤
@receiver: a *SliceMsgBatch
@receiver a
@param filter []string
@return []string

----------------develop info----------------

@Author:		huang_calvin@163.com
@DateTime:		2024-09-08 11:38:31

--------------------------------------------

func (*SliceMsgBatch) GetClean

func (a *SliceMsgBatch) GetClean() []*KafkaMsg

GetClean

@Description: 返回过滤后的列表并且清理
@receiver: a *SliceMsgBatch
@receiver a
@return []*KafkaMsg

----------------develop info----------------

@Author:		huang_calvin@163.com
@DateTime:		2024-09-08 14:57:40

--------------------------------------------

func (*SliceMsgBatch) GetUuidList

func (a *SliceMsgBatch) GetUuidList() []string

GetUuidList

@Description: 获得批次的uuid切片
@receiver: a *SliceMsgBatch
@receiver a
@return []string

----------------develop info----------------

@Author:		huang_calvin@163.com
@DateTime:		2024-09-08 14:21:39

--------------------------------------------

func (*SliceMsgBatch) Push

func (a *SliceMsgBatch) Push(msg *KafkaMsg, uuid string) int

Push

@Description: 插入list并且返回长度(如果有相同的uuid,则先到先得)
@receiver: a *SliceMsgBatch
@receiver a
@param msg *KafkaMsg
@param uuid string
@return int

----------------develop info----------------

@Author:		huang_calvin@163.com
@DateTime:		2024-09-08 11:31:41

--------------------------------------------

Jump to

Keyboard shortcuts

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