memory

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgBus

func NewMsgBus() xmsgbus.IMsgBus

func NewStorage

func NewStorage() xmsgbus.ISharedStorage

Types

type MsgBus

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

func (*MsgBus) AddChannel

func (x *MsgBus) AddChannel(ctx context.Context, topic string, channel string) error

func (*MsgBus) ListChannel

func (x *MsgBus) ListChannel(ctx context.Context, topic string) ([]string, error)

func (*MsgBus) Pop

func (x *MsgBus) Pop(ctx context.Context, topic, channel string, blockTimeout time.Duration) ([]byte, error)

func (*MsgBus) Push

func (x *MsgBus) Push(ctx context.Context, topic string, bs []byte) error

func (*MsgBus) RemoveChannel

func (x *MsgBus) RemoveChannel(ctx context.Context, topic string, channel string) error

type Storage

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

func (*Storage) Del

func (x *Storage) Del(ctx context.Context, key string) error

func (*Storage) Keys

func (x *Storage) Keys(ctx context.Context, prefix string) ([]string, error)

func (*Storage) SetEx

func (x *Storage) SetEx(ctx context.Context, key string, value interface{}, ttl time.Duration) error

Jump to

Keyboard shortcuts

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