dumper

package
v0.0.0-...-cc59c3f Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigRouter

func ConfigRouter(r *gin.Engine)

package level functions

func PutSyncRecord

func PutSyncRecord(key string, timestamp, mills int64, count int, message string)

向 syncDumper 添加同步记录

Types

type SyncDumper

type SyncDumper struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSyncDumper

func NewSyncDumper() *SyncDumper

创建一个新的 SyncDumper 实例

func (*SyncDumper) ConfigRouter

func (sd *SyncDumper) ConfigRouter(r *gin.Engine)

配置路由,提供了一个 /dumper/sync 的 HTTP GET 请求 只允许本地访问(127.0.0.1 或 ::1)

func (*SyncDumper) Put

func (sd *SyncDumper) Put(key string, timestamp, mills int64, count int, message string)

func (*SyncDumper) Sprint

func (sd *SyncDumper) Sprint() string

busi_groups: last: timestamp, mills, count curr: timestamp, mills, count

type SyncRecord

type SyncRecord struct {
	Timestamp int64
	Mills     int64
	Count     int
	Message   string
}

func (*SyncRecord) String

func (sr *SyncRecord) String() string

type SyncRecords

type SyncRecords struct {
	Current *SyncRecord
	Last    *SyncRecord
}

Jump to

Keyboard shortcuts

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