locker

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const GlOBALLOCK = "GLOBAL_LOCK"

Variables

This section is empty.

Functions

This section is empty.

Types

type LockerMessage

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

func NewLockerMessage

func NewLockerMessage(cache cache.MsgModel) *LockerMessage

func (*LockerMessage) LockGlobalMessage

func (l *LockerMessage) LockGlobalMessage(ctx context.Context, clientMsgID string) (err error)

func (*LockerMessage) LockMessageTypeKey

func (l *LockerMessage) LockMessageTypeKey(ctx context.Context, clientMsgID, typeKey string) (err error)

func (*LockerMessage) UnLockGlobalMessage

func (l *LockerMessage) UnLockGlobalMessage(ctx context.Context, clientMsgID string) error

func (*LockerMessage) UnLockMessageTypeKey

func (l *LockerMessage) UnLockMessageTypeKey(ctx context.Context, clientMsgID string, typeKey string) error

type MessageLocker

type MessageLocker interface {
	LockMessageTypeKey(ctx context.Context, clientMsgID, typeKey string) (err error)
	UnLockMessageTypeKey(ctx context.Context, clientMsgID string, typeKey string) error
	LockGlobalMessage(ctx context.Context, clientMsgID string) (err error)
	UnLockGlobalMessage(ctx context.Context, clientMsgID string) (err error)
}

Jump to

Keyboard shortcuts

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