Documentation ¶
Index ¶
- Variables
- type DbOp
- type SeaClient
- func (sc *SeaClient) AddPreparation(id string, override bool, more ...string) error
- func (sc *SeaClient) AddUser(id string, v *map[string]string) (err error)
- func (sc *SeaClient) ClearAllSeeds()
- func (sc *SeaClient) Close()
- func (sc *SeaClient) DeleteUser(id string) (err error)
- func (sc *SeaClient) GetSeed(pick func(interface{}) bool) (id string, err error)
- func (sc *SeaClient) GetUserAll(id string) (v *map[string]string, err error)
- func (sc *SeaClient) MarkSeed(id string) (err error)
- func (sc *SeaClient) UnmarkSeed(id string) (err error)
- func (sc *SeaClient) UserExisted(id string) (b bool)
- func (sc *SeaClient) UserIsSeed(id string) (b bool)
- type SeedOp
Constants ¶
This section is empty.
Variables ¶
View Source
var MIN_COUNT = int64(10000)
View Source
var NAMESPACE_XUEQIU_FOLLOWER = "com.xueqiu:follower:"
View Source
var NAMESPACE_XUEQIU_USER = "com.xueqiu:user:"
View Source
var OFFSET = int64(400)
Functions ¶
This section is empty.
Types ¶
type DbOp ¶
type DbOp interface { //check if user is existed UserExisted(id string) bool //add a user AddUser(id string, v *map[string]string) error //get user all info GetUserAll(id string) (v *map[string]string, err error) //get user specific info //GetUserInfo(id string) (info string, err error) //delete a user DeleteUser(id string) error }
type SeaClient ¶
type SeaClient struct {
// contains filtered or unexported fields
}
func (*SeaClient) AddPreparation ¶
func (*SeaClient) ClearAllSeeds ¶
func (sc *SeaClient) ClearAllSeeds()
func (*SeaClient) DeleteUser ¶
func (*SeaClient) GetSeed ¶
generate seed from users by scan hmap skip users which are seed already or have less than
func (*SeaClient) GetUserAll ¶
func (*SeaClient) UnmarkSeed ¶
func (*SeaClient) UserIsSeed ¶
used to be seed or not
type SeedOp ¶
type SeedOp interface { //add id as preparation AddPreparation(id string, override bool, more ...string) error //delete all seed data including preparation id ClearAllSeeds() //check if user is a seed UserIsSeed(id string) bool //mark user as a seed. if user does not exist, add it MarkSeed(id string) error //unmark user UnmarkSeed(id string) error //unmark all seeds //UnmarkAllSeeds() //pick a user as seed, user will be mark as seed GetSeed(pick func(interface{}) bool) (id string, err error) }
Click to show internal directories.
Click to hide internal directories.