memory

package
v0.0.29 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

type Memory struct {
	PoolNum int64
	// contains filtered or unexported fields
}

func NewMemory

func NewMemory(poolNum int64) *Memory

NewMemory 内存模式

func (*Memory) Append

func (s *Memory) Append(stream string, message data.Message) error

Append 追加消息到指定内存队列。

func (*Memory) Register

func (s *Memory) Register(name string, fn data.ConsumerFunc)

Register 注册指定队列的消费处理函数。

func (*Memory) Run

func (s *Memory) Run()

Run 启动内存队列阻塞等待,直到收到关闭信号。

func (*Memory) Shutdown

func (s *Memory) Shutdown()

Shutdown 关闭内存队列阻塞等待。

func (*Memory) Wait added in v0.0.25

func (s *Memory) Wait()

Wait 等待已注册的内存队列消费者退出。

Jump to

Keyboard shortcuts

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