offline

package
v0.0.0-...-ae8612d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

func InitStore

func InitStore(
	ctx context.Context,
	redisPool *redis.Pool,
) (*Store, error)

func (*Store) Clean

func (s *Store) Clean(ctx context.Context, uid string, expire time.Duration, platformToMaxOMCount map[string]int) error

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, uid string, platform string, seqs []string) error

func (*Store) Read

func (s *Store) Read(ctx context.Context, uid string, platform string, expire time.Duration, readCount int64) ([]*msgpb.Message, func(context.Context) error, error)

返回 seq:content deleteFunc error

func (*Store) Write

func (s *Store) Write(ctx context.Context,
	uid string, platform string,
	msg *msgpb.Message,
	sendTime time.Time, expire time.Duration,
) error

Jump to

Keyboard shortcuts

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