common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoroutineGroupResponder1 = "FileMessage-Responder-listenRequestMessageFile"
	CoroutineGroupResponder2 = "FileMessage-Responder-processRequestMessage"
	CoroutineGroupRequester1 = "FileMessage-Requester-listenResponseMessageFile"
	RequestMsgDirName        = "request"
	ResponseMsgDirName       = "response"

	RequestMsgOpType  = "request"
	ResponseMsgOpType = "response"
)

Variables

This section is empty.

Functions

func FmtRequestMessageFileName

func FmtRequestMessageFileName(seqNum uint64, nanosecond int64) string

func FmtResponseMessageFileName

func FmtResponseMessageFileName(seqNum uint64, nanosecond int64) string

func ParseMessageFileName

func ParseMessageFileName(fileName string) (retOpType string, retSeqNum uint64, retNanosecond int64, retErr error)

Types

type MessageContext

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

func NewMessageContext

func NewMessageContext(msgInfo *MessageInfo) *MessageContext

func (*MessageContext) GetEventHook

func (t *MessageContext) GetEventHook() chan uint8

func (*MessageContext) GetMessageInfo

func (t *MessageContext) GetMessageInfo() *MessageInfo

func (*MessageContext) PopEventWithTimeout

func (t *MessageContext) PopEventWithTimeout(timeout time.Duration) (retEvent uint8, retErr error)

func (*MessageContext) PushEvent

func (t *MessageContext) PushEvent(event uint8) error

type MessageInfo

type MessageInfo struct {
	FileName   string
	FilePath   string
	OpType     string
	SeqNum     uint64
	Nanosecond int64
}

type OnReceivedMessage

type OnReceivedMessage func(msgData []byte, seqNum uint64, nanosecond int64) []byte

Jump to

Keyboard shortcuts

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