ping

package module
v1.1.48 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

README

ping

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRetry = fmt.Errorf("retry")

Functions

func CtxLogger

func CtxLogger(ctx context.Context) *logrus.Entry

func GetLogger

func GetLogger() *logrus.Logger

Types

type Event

type Event struct {
	Id         string `json:"id"`
	Uid        string `json:"uid"`
	RetryCount int    `json:"retryCount"`
}

func (*Event) Marshall

func (e *Event) Marshall() []byte

type Option

type Option struct {
	Prefix     string
	OfflineTTL int64
}

type Service

type Service struct {
	Prefix string
	// contains filtered or unexported fields
}

func NewService

func NewService(redisClient redis.UniversalClient, opt *Option) *Service

func (*Service) Ping

func (s *Service) Ping(ctx context.Context, uid string) error

func (*Service) RegisterOfflineHandle added in v1.1.48

func (s *Service) RegisterOfflineHandle(f func(uid string) error)

func (*Service) SetDebug

func (s *Service) SetDebug(debug bool)

func (*Service) StartTick

func (s *Service) StartTick()

Jump to

Keyboard shortcuts

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