messagestore

package
v0.0.0-...-68b20d9 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageStore

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

func NewMessageStore

func NewMessageStore(dic *di.Container) *MessageStore

func (*MessageStore) DeleteMsgId

func (wp *MessageStore) DeleteMsgId(id string)

func (*MessageStore) GenAckChan

func (wp *MessageStore) GenAckChan(id string) *MsgAckChan

func (*MessageStore) LoadMsgChan

func (wp *MessageStore) LoadMsgChan(id string) (interface{}, bool)

func (*MessageStore) StoreMsgId

func (wp *MessageStore) StoreMsgId(id string, ch string)

func (*MessageStore) StoreRange

func (wp *MessageStore) StoreRange()

type MessageStores

type MessageStores interface {
	StoreMsgId(id string, ch string)
	LoadMsgChan(id string) (interface{}, bool)
	DeleteMsgId(id string)
	GenAckChan(id string) *MsgAckChan
}

type MsgAckChan

type MsgAckChan struct {
	Mu       sync.Mutex
	Id       string
	IsClosed bool
	DataChan chan interface{}
}

func (*MsgAckChan) TryCloseChan

func (mac *MsgAckChan) TryCloseChan()

func (*MsgAckChan) TrySendDataAndCloseChan

func (mac *MsgAckChan) TrySendDataAndCloseChan(data interface{}) bool

Jump to

Keyboard shortcuts

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