replayer

package
v0.0.0-...-10178d1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PendingQueueCapacity = 256
)

Variables

This section is empty.

Functions

func GetErrNotFound

func GetErrNotFound() error

func InitMongoConnect

func InitMongoConnect()

func SaveToMongo

func SaveToMongo(oplog *oplog.PartialLog)

Types

type ExampleReplayer

type ExampleReplayer struct {
	Retransmit bool  // need re-transmit
	Ack        int64 // ack number
	// contains filtered or unexported fields
}

func NewExampleReplayer

func NewExampleReplayer(id int) *ExampleReplayer

func (*ExampleReplayer) GetAcked

func (er *ExampleReplayer) GetAcked() int64

func (*ExampleReplayer) Sync

func (er *ExampleReplayer) Sync(message *tunnel.TMessage, completion func()) int64

* Receiver message and do the following steps: * 1. if we need re-transmit, this log will be discard * 2. validate the checksum * 3. decompress * 4. put message into channel * Generally speaking, do not modify this function.

type MessageWithCallback

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

type SessionStore

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

func NewSessionStore

func NewSessionStore() *SessionStore

func (*SessionStore) C

func (ss *SessionStore) C(name string) *mgo.Collection

获取数据库的collection

func (*SessionStore) Close

func (ss *SessionStore) Close()

type StreetPicInfo

type StreetPicInfo struct {
	OriginObjectIdHex string `bson:"origin_mongo_id"`
	Pid               string `bson:"pid"`
	Pic               []byte `bson:"pic"`
	CreateTime        string `bson:"create_time"`
	VillageCode       string `bson:"village_code"`
}

type VillagePicInfo

type VillagePicInfo struct {
	OriginObjectId bson.ObjectId `bson:"_id"`
	Pid            string        `bson:"pid"`
	Pic            []byte        `bson:"pic"`
	VillageCode    string        `bson:"village_code"`
}

Directories

Path Synopsis
this is an receiver example connect to different tunnels
this is an receiver example connect to different tunnels

Jump to

Keyboard shortcuts

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