summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
54cfa57)
Change-Id: I6d8cb9fffaeb063c1b02882f0291682e2bb66f52
Signed-off-by: Mohamed Abukar <abukar.mohamed@nokia.com>
-func (s *SDLClient) Store(key string, value interface{}) (err error) {
- err = s.db.Set(key, value)
+func (s *SDLClient) doSet(pairs ...interface{}) (err error) {
+ err = s.db.Set(pairs)
if err != nil {
s.UpdateStatCounter("StoreError")
} else {
if err != nil {
s.UpdateStatCounter("StoreError")
} else {
+func (s *SDLClient) Store(key string, value interface{}) (err error) {
+ return s.doSet(key, value)
+}
+
+func (s *SDLClient) MStore(pairs ...interface{}) (err error) {
+ return s.doSet(pairs)
+}
+
func (s *SDLClient) Read(key string) (value map[string]interface{}, err error) {
func (s *SDLClient) Read(key string) (value map[string]interface{}, err error) {
- value, err = s.db.Get([]string{key})
- return
+ return s.db.Get([]string{key})
+}
+
+func (s *SDLClient) MRead(key []string) (value map[string]interface{}, err error) {
+ return s.db.Get(key)
+}
+
+func (s *SDLClient) ReadAllKeys(key string) (value []string, err error) {
+ return s.db.GetAll()
}
func (s *SDLClient) Subscribe(cb func(string, ...string), channel string) error {
}
func (s *SDLClient) Subscribe(cb func(string, ...string), channel string) error {
type RMRStatistics struct{}
type RMRClient struct {
type RMRStatistics struct{}
type RMRClient struct {
- context unsafe.Pointer
- ready int
- wg sync.WaitGroup
- mux sync.Mutex
- stat map[string]Counter
- consumers []MessageConsumer
- readyCb ReadyCB
+ context unsafe.Pointer
+ ready int
+ wg sync.WaitGroup
+ mux sync.Mutex
+ stat map[string]Counter
+ consumers []MessageConsumer
+ readyCb ReadyCB
+ readyCbParams interface{}
}
type MessageConsumer interface {
}
type MessageConsumer interface {
+ m.readyCb(m.readyCbParams)
-func (m *RMRClient) SetReadyCB(cb ReadyCB) {
+func (m *RMRClient) SetReadyCB(cb ReadyCB, params interface{}) {
+ m.readyCbParams = params
}
func (m *RMRClient) GetRicMessageId(name string) (int, bool) {
}
func (m *RMRClient) GetRicMessageId(name string) (int, bool) {
+type ReadyCB func(interface{})
var (
// XApp is an application instance
var (
// XApp is an application instance
return Rmr.IsReady() && Sdl.IsReady()
}
return Rmr.IsReady() && Sdl.IsReady()
}
-func SetReadyCB(cb ReadyCB) {
- Rmr.SetReadyCB(cb)
+func SetReadyCB(cb ReadyCB, params interface{}) {
+ Rmr.SetReadyCB(cb, params)