Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustParseDuration ¶
func TryEnqueue ¶
Types ¶
type Config ¶
type Config struct { PKr c_type.PKr MaxWorkNumber int MaxQueueNumber int Fee ServiceFee RedisConfig RedisConfig }
type JSONRpcResp ¶
type JSONRpcResp struct { Id *json.RawMessage `json:"id"` Result *json.RawMessage `json:"result"` Error map[string]interface{} `json:"error"` }
type LocalClient ¶
type LocalClient struct {
// contains filtered or unexported fields
}
func NewLocalClient ¶
func NewLocalClient(backend Backend) *LocalClient
type MapStorage ¶
type MapStorage struct {
// contains filtered or unexported fields
}
func (*MapStorage) Save ¶
func (storage *MapStorage) Save(job *Job)
type ProofService ¶
type ProofService struct {
// contains filtered or unexported fields
}
func Instance ¶
func Instance() *ProofService
func NewProofService ¶
func NewProofService(rpc string, backend Backend, config *Config) *ProofService
func (*ProofService) Fee ¶
func (proof *ProofService) Fee() ServiceFee
func (*ProofService) FindTxHash ¶
func (proof *ProofService) FindTxHash(hash common.Hash) common.Hash
func (*ProofService) SubmitWork ¶
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewRedisClient ¶
func NewRedisClient(cfg *RedisConfig, prefix string) *RedisClient
func (*RedisClient) BgSave ¶
func (r *RedisClient) BgSave() (string, error)
func (*RedisClient) Check ¶
func (r *RedisClient) Check() (string, error)
func (*RedisClient) Client ¶
func (r *RedisClient) Client() *redis.Client
func (*RedisClient) Save ¶
func (r *RedisClient) Save(job *Job)
type RedisConfig ¶
type RemoteClient ¶
type RemoteClient struct {
// contains filtered or unexported fields
}
func NewRemoteClient ¶
func NewRemoteClient(host string) *RemoteClient
type SeroClient ¶
type ServiceFee ¶
Click to show internal directories.
Click to hide internal directories.