react-native-jedis

0.0.4 • Public • Published

说明

基于jedis开发 通过监听特定的key值实现订阅机制

使用说明

import {init, subscribe, unSubscribe} from 'react-native-jedis';


const host = '192.168.1.98';
const port = 6379;

//初始化
 init(host, port);


 //订阅
 let cancel="cancel"  //订阅的key值,当前只支持list类型的value
 subscribe(cancel, data => {
       console.log(data);                    
 });


//取消订阅
unSubscribe()

Package Sidebar

Install

npm i react-native-jedis

Weekly Downloads

0

Version

0.0.4

License

none

Unpacked Size

561 kB

Total Files

11

Last publish

Collaborators

  • kaelthaswang