db

package
v0.0.0-...-3d0adf2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

====================================================

# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : public.go # Created : 2019/1/24 14:37 # Last Modified : 2019/1/24 14:37 # Describe : # # ====================================================

====================================================

# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : sms.go # Created : 2019/1/24 11:27 # Last Modified : 2019/1/24 11:27 # Describe : # # ====================================================

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register()

Types

type Msg

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

Msg 定时读取缓存中的数据,持久化到数据库

func NewMsgCorn

func NewMsgCorn(n int64) *Msg

NewMsgCorn 初始化一个定时写入的任务,n为每次读取和写入的最大数据量

func (*Msg) Name

func (e *Msg) Name() string

Name 返回需要抓取信息的list的名称

func (*Msg) Read

func (e *Msg) Read() ([][]byte, error)

Read 读取缓存中的信息

func (*Msg) Write

func (e *Msg) Write(param [][]byte) (err error)

Write 将缓存中的信息批量存入数据库

Jump to

Keyboard shortcuts

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