scanner

package
v0.0.0-...-69c43f4 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TencentCluster = "tencent_cluster"
	AliyunCluster  = "aliyun_cluster"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyFileScanner

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

func (*KeyFileScanner) Close

func (kfs *KeyFileScanner) Close()

func (*KeyFileScanner) EndNode

func (kfs *KeyFileScanner) EndNode() bool

func (*KeyFileScanner) NodeCount

func (kfs *KeyFileScanner) NodeCount() (int, error)

func (*KeyFileScanner) ScanKey

func (kfs *KeyFileScanner) ScanKey(node interface{}) ([]string, error)

type NormalScanner

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

func (*NormalScanner) Close

func (ns *NormalScanner) Close()

func (*NormalScanner) EndNode

func (ns *NormalScanner) EndNode() bool

func (*NormalScanner) NodeCount

func (ns *NormalScanner) NodeCount() (int, error)

func (*NormalScanner) ScanKey

func (ns *NormalScanner) ScanKey(node interface{}) ([]string, error)

type Scanner

type Scanner interface {
	/*
	 * get db node info.
	 * return:
	 *     int: node number. Used in aliyun_cluster
	 */
	NodeCount() (int, error)

	// return scanned keys
	ScanKey(node interface{}) ([]string, error) // return the scanned keys

	// end current node
	EndNode() bool

	Close()
}

scanner used to scan keys

func NewScanner

func NewScanner(client redis.Conn) Scanner

type SpecialCloudScanner

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

func (*SpecialCloudScanner) Close

func (scs *SpecialCloudScanner) Close()

func (*SpecialCloudScanner) EndNode

func (scs *SpecialCloudScanner) EndNode() bool

func (*SpecialCloudScanner) NodeCount

func (scs *SpecialCloudScanner) NodeCount() (int, error)

func (*SpecialCloudScanner) ScanKey

func (scs *SpecialCloudScanner) ScanKey(node interface{}) ([]string, error)

Jump to

Keyboard shortcuts

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