Documentation
¶
Index ¶
- Constants
- type Config
- type Miner
- type PaymentCharts
- type PoolCharts
- type PubSub
- type RedisClient
- func (r *RedisClient) BgSave() (string, error)
- func (r *RedisClient) Check() (string, error)
- func (r *RedisClient) CheckPoWExist(height uint64, params []string) (bool, error)
- func (r *RedisClient) Client() *redis.Client
- func (r *RedisClient) DelAPIToken(jstSign string) error
- func (r *RedisClient) GetAPIToken(jstSign string) (string, error)
- func (r *RedisClient) GetAlarmBeat(login string) (bool, error)
- func (r *RedisClient) GetAllMinerAccount() (account []string, err error)
- func (r *RedisClient) GetAllReportedtHashrate(login string) (int64, error)
- func (r *RedisClient) GetBalance(login string) (int64, error)
- func (r *RedisClient) GetBlacklist() ([]string, error)
- func (r *RedisClient) GetNodeHeight(id string) (int64, error)
- func (r *RedisClient) GetNodeStates() ([]map[string]interface{}, error)
- func (r *RedisClient) GetPaymentCharts(login string) (stats []*PaymentCharts, err error)
- func (r *RedisClient) GetPoolCharts(poolHashLen int64) (stats []*PoolCharts, err error)
- func (r *RedisClient) GetReportedtHashrate(login string) (map[string]int64, error)
- func (r *RedisClient) GetToken(userName string) (string, error)
- func (r *RedisClient) GetWhitelist() ([]string, error)
- func (r *RedisClient) InitAlarmBeat(alarmList []string, exp time.Duration) error
- func (r *RedisClient) InitPubSub(name string, proc PubSub)
- func (r *RedisClient) IsPayoutsLocked() (bool, error)
- func (r *RedisClient) LockPayouts(login string, amount int64) error
- func (r *RedisClient) Publish(channel string, opcode string, data string, reply string) (int64, error)
- func (r *RedisClient) SetAPIToken(jstSign string, jwtFullStr string, expirationMin int64) error
- func (r *RedisClient) SetReportedtHashrates(logins map[string]string, WorkerId string) error
- func (r *RedisClient) SetToken(userName string, jwtSign string, expirationMin int64) error
- func (r *RedisClient) UnlockPayouts() error
- func (r *RedisClient) WriteAlarmBeat(login string, exp time.Duration) error
- func (r *RedisClient) WriteMinerCharts(time1 int64, time2, k string, hash, largeHash, workerOnline int64, share int64, ...) error
- func (r *RedisClient) WriteNodeState(id string, height uint64, diff *big.Int) error
- func (r *RedisClient) WritePoolCharts(time1 int64, time2 string, poolHash string) error
- type SumRewardData
- type Worker
Constants ¶
View Source
const ( ChannelAuth = "auth" ChannelPoint = "point" ChannelWeb = "web" ChannelManager = "mgr" )
View Source
const ( OpcodeChangeServStatus = "change-serv-status" OpcodeLoadIP = "inbound-ip" OpcodeWhiteList = "white-list" OpcodeMinerSub = "miner-sub" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaymentCharts ¶
type PoolCharts ¶
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewRedisClient ¶
func NewRedisClient(cfg *Config) *RedisClient
func (*RedisClient) BgSave ¶
func (r *RedisClient) BgSave() (string, error)
func (*RedisClient) Check ¶
func (r *RedisClient) Check() (string, error)
func (*RedisClient) CheckPoWExist ¶
func (r *RedisClient) CheckPoWExist(height uint64, params []string) (bool, error)
func (*RedisClient) Client ¶
func (r *RedisClient) Client() *redis.Client
func (*RedisClient) DelAPIToken ¶
func (r *RedisClient) DelAPIToken(jstSign string) error
func (*RedisClient) GetAPIToken ¶
func (r *RedisClient) GetAPIToken(jstSign string) (string, error)
func (*RedisClient) GetAlarmBeat ¶
func (r *RedisClient) GetAlarmBeat(login string) (bool, error)
func (*RedisClient) GetAllMinerAccount ¶
func (r *RedisClient) GetAllMinerAccount() (account []string, err error)
func (*RedisClient) GetAllReportedtHashrate ¶
func (r *RedisClient) GetAllReportedtHashrate(login string) (int64, error)
func (*RedisClient) GetBalance ¶
func (r *RedisClient) GetBalance(login string) (int64, error)
func (*RedisClient) GetBlacklist ¶
func (r *RedisClient) GetBlacklist() ([]string, error)
Always returns list of addresses. If Redis fails it will return empty list.
func (*RedisClient) GetNodeHeight ¶
func (r *RedisClient) GetNodeHeight(id string) (int64, error)
func (*RedisClient) GetNodeStates ¶
func (r *RedisClient) GetNodeStates() ([]map[string]interface{}, error)
func (*RedisClient) GetPaymentCharts ¶
func (r *RedisClient) GetPaymentCharts(login string) (stats []*PaymentCharts, err error)
func (*RedisClient) GetPoolCharts ¶
func (r *RedisClient) GetPoolCharts(poolHashLen int64) (stats []*PoolCharts, err error)
func (*RedisClient) GetReportedtHashrate ¶
func (r *RedisClient) GetReportedtHashrate(login string) (map[string]int64, error)
func (*RedisClient) GetWhitelist ¶
func (r *RedisClient) GetWhitelist() ([]string, error)
Always returns list of IPs. If Redis fails it will return empty list.
func (*RedisClient) InitAlarmBeat ¶
func (r *RedisClient) InitAlarmBeat(alarmList []string, exp time.Duration) error
func (*RedisClient) InitPubSub ¶
func (r *RedisClient) InitPubSub(name string, proc PubSub)
func (*RedisClient) IsPayoutsLocked ¶
func (r *RedisClient) IsPayoutsLocked() (bool, error)
func (*RedisClient) LockPayouts ¶
func (r *RedisClient) LockPayouts(login string, amount int64) error
func (*RedisClient) SetAPIToken ¶
func (r *RedisClient) SetAPIToken(jstSign string, jwtFullStr string, expirationMin int64) error
func (*RedisClient) SetReportedtHashrates ¶
func (r *RedisClient) SetReportedtHashrates(logins map[string]string, WorkerId string) error
func (*RedisClient) SetToken ¶
func (r *RedisClient) SetToken(userName string, jwtSign string, expirationMin int64) error
func (*RedisClient) UnlockPayouts ¶
func (r *RedisClient) UnlockPayouts() error
func (*RedisClient) WriteAlarmBeat ¶
func (r *RedisClient) WriteAlarmBeat(login string, exp time.Duration) error
func (*RedisClient) WriteMinerCharts ¶
func (*RedisClient) WriteNodeState ¶
func (*RedisClient) WritePoolCharts ¶
func (r *RedisClient) WritePoolCharts(time1 int64, time2 string, poolHash string) error
WritePoolCharts is pool charts
type SumRewardData ¶
Click to show internal directories.
Click to hide internal directories.