postgres

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

View Source
const PgtimeFormat = "2006-01-02 15:04:05.000000"

Variables

View Source
var PostgresTimeFormat = []string{"2006-01-02 15:04:05.000000", "2006-01-02 15:04:05", "2006-1-2 15:4:5.000000", "2006-1-2 15:4:5"}

Functions

func NewPostgresReader

func NewPostgresReader(meta *reader.Meta, conf conf.MapConf) (reader.Reader, error)

func ParsePostgresDatetime

func ParsePostgresDatetime(str string) (time.Time, error)

Types

type PostgresReader

type PostgresReader struct {
	Cron *cron.Cron //定时任务
	// contains filtered or unexported fields
}

func (*PostgresReader) Close

func (r *PostgresReader) Close() error

func (*PostgresReader) Name

func (r *PostgresReader) Name() string

func (*PostgresReader) ReadData

func (r *PostgresReader) ReadData() (models.Data, int64, error)

func (*PostgresReader) ReadLine

func (r *PostgresReader) ReadLine() (string, error)

func (*PostgresReader) SetMode

func (r *PostgresReader) SetMode(mode string, v interface{}) error

func (*PostgresReader) Source

func (r *PostgresReader) Source() string

func (*PostgresReader) Start

func (r *PostgresReader) Start() error

func (*PostgresReader) Status

func (r *PostgresReader) Status() models.StatsInfo

func (*PostgresReader) SyncMeta

func (r *PostgresReader) SyncMeta()

SyncMeta 从队列取数据时同步队列,作用在于保证数据不重复

Jump to

Keyboard shortcuts

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