feat(single): change string to proto.KeyBase
This commit is contained in:
parent
f17cab2016
commit
97833ed150
|
@ -13,7 +13,7 @@ func (s *serverSingle) Set(
|
||||||
) (*proto.SetResponse, error) {
|
) (*proto.SetResponse, error) {
|
||||||
|
|
||||||
work := event.EventWorkFunc(func() (interface{}, error) {
|
work := event.EventWorkFunc(func() (interface{}, error) {
|
||||||
return s.dao.Set(req.Key.Key, req.Val)
|
return s.dao.Set(req.Key, req.Val)
|
||||||
})
|
})
|
||||||
|
|
||||||
lruEvent := event.NewEvent(lru.OptionEventName)
|
lruEvent := event.NewEvent(lru.OptionEventName)
|
||||||
|
@ -35,7 +35,7 @@ func (s *serverSingle) Get(
|
||||||
req *proto.GetRequest,
|
req *proto.GetRequest,
|
||||||
) (*proto.GetResponse, error) {
|
) (*proto.GetResponse, error) {
|
||||||
work := event.EventWorkFunc(func() (interface{}, error) {
|
work := event.EventWorkFunc(func() (interface{}, error) {
|
||||||
return s.dao.Get(req.Key.Key)
|
return s.dao.Get(req.Key)
|
||||||
})
|
})
|
||||||
|
|
||||||
lruEvent := event.NewEvent(lru.OptionEventName)
|
lruEvent := event.NewEvent(lru.OptionEventName)
|
||||||
|
@ -56,7 +56,7 @@ func (s serverSingle) Add(
|
||||||
req *proto.AddRequest,
|
req *proto.AddRequest,
|
||||||
) (*proto.AddResponse, error) {
|
) (*proto.AddResponse, error) {
|
||||||
work := event.EventWorkFunc(func() (interface{}, error) {
|
work := event.EventWorkFunc(func() (interface{}, error) {
|
||||||
return s.dao.Add(req.Key.Key, req.Renewal)
|
return s.dao.Add(req.Key, req.Renewal)
|
||||||
})
|
})
|
||||||
|
|
||||||
lruEvent := event.NewEvent(lru.OptionEventName)
|
lruEvent := event.NewEvent(lru.OptionEventName)
|
||||||
|
@ -77,7 +77,7 @@ func (s *serverSingle) Reduce(
|
||||||
req *proto.ReduceRequest,
|
req *proto.ReduceRequest,
|
||||||
) (*proto.ReduceResponse, error) {
|
) (*proto.ReduceResponse, error) {
|
||||||
work := event.EventWorkFunc(func() (interface{}, error) {
|
work := event.EventWorkFunc(func() (interface{}, error) {
|
||||||
return s.dao.Add(req.Key.Key, req.Renewal)
|
return s.dao.Add(req.Key, req.Renewal)
|
||||||
})
|
})
|
||||||
|
|
||||||
lruEvent := event.NewEvent(lru.OptionEventName)
|
lruEvent := event.NewEvent(lru.OptionEventName)
|
||||||
|
@ -98,7 +98,7 @@ func (s *serverSingle) Setbit(
|
||||||
req *proto.SetbitRequest,
|
req *proto.SetbitRequest,
|
||||||
) (*proto.SetbitResponse, error) {
|
) (*proto.SetbitResponse, error) {
|
||||||
work := event.EventWorkFunc(func() (interface{}, error) {
|
work := event.EventWorkFunc(func() (interface{}, error) {
|
||||||
return nil, s.dao.Setbit(req.Key.Key, req.Val, req.Offer)
|
return nil, s.dao.Setbit(req.Key, req.Val, req.Offer)
|
||||||
})
|
})
|
||||||
|
|
||||||
lruEvent := event.NewEvent(lru.OptionEventName)
|
lruEvent := event.NewEvent(lru.OptionEventName)
|
||||||
|
@ -117,7 +117,7 @@ func (s *serverSingle) Getbit(
|
||||||
req *proto.GetbitRequest,
|
req *proto.GetbitRequest,
|
||||||
) (*proto.GetbitResponse, error) {
|
) (*proto.GetbitResponse, error) {
|
||||||
work := event.EventWorkFunc(func() (interface{}, error) {
|
work := event.EventWorkFunc(func() (interface{}, error) {
|
||||||
return s.dao.GetBit(req.Key.Key, req.Offer)
|
return s.dao.GetBit(req.Key, req.Offer)
|
||||||
})
|
})
|
||||||
|
|
||||||
lruEvent := event.NewEvent(lru.OptionEventName)
|
lruEvent := event.NewEvent(lru.OptionEventName)
|
||||||
|
|
Loading…
Reference in New Issue