mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 14:07:02 +09:00
WIP inner storage
This commit is contained in:
parent
b21c98f497
commit
c788051efe
9 changed files with 858 additions and 400 deletions
|
@ -1,28 +0,0 @@
|
|||
package keyvalue
|
||||
|
||||
import (
|
||||
"encoding/hex"
|
||||
|
||||
"github.com/anyproto/any-store/anyenc"
|
||||
"github.com/zeebo/blake3"
|
||||
)
|
||||
|
||||
type KeyValue struct {
|
||||
Key string
|
||||
Value []byte
|
||||
TimestampMilli int
|
||||
}
|
||||
|
||||
func (kv KeyValue) AnyEnc(a *anyenc.Arena) *anyenc.Value {
|
||||
obj := a.NewObject()
|
||||
obj.Set("id", a.NewString(kv.Key))
|
||||
if len(kv.Value) == 0 {
|
||||
obj.Set("d", a.NewTrue())
|
||||
} else {
|
||||
obj.Set("v", a.NewBinary(kv.Value))
|
||||
hash := blake3.Sum256(kv.Value)
|
||||
obj.Set("h", a.NewString(hex.EncodeToString(hash[:])))
|
||||
}
|
||||
obj.Set("t", a.NewNumberInt(kv.TimestampMilli))
|
||||
return obj
|
||||
}
|
11
commonspace/object/keyvalue/keyvalue.go
Normal file
11
commonspace/object/keyvalue/keyvalue.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package keyvalue
|
||||
|
||||
import (
|
||||
"github.com/anyproto/any-sync/app"
|
||||
"github.com/anyproto/any-sync/commonspace/object/keyvalue/keyvaluestorage/innerstorage"
|
||||
)
|
||||
|
||||
type KeyValueService interface {
|
||||
app.ComponentRunnable
|
||||
DefaultStore() innerstorage.KeyValueStorage
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package innerstorage
|
||||
|
||||
import (
|
||||
"github.com/anyproto/any-store/anyenc"
|
||||
|
||||
"github.com/anyproto/any-sync/commonspace/spacesyncproto"
|
||||
)
|
||||
|
||||
type KeyValue struct {
|
||||
Key string
|
||||
Value Value
|
||||
TimestampMilli int
|
||||
}
|
||||
|
||||
type Value struct {
|
||||
Value []byte
|
||||
PeerSignature []byte
|
||||
IdentitySignature []byte
|
||||
}
|
||||
|
||||
func (v Value) AnyEnc(a *anyenc.Arena) *anyenc.Value {
|
||||
obj := a.NewObject()
|
||||
obj.Set("v", a.NewBinary(v.Value))
|
||||
obj.Set("p", a.NewBinary(v.PeerSignature))
|
||||
obj.Set("i", a.NewBinary(v.IdentitySignature))
|
||||
return obj
|
||||
}
|
||||
|
||||
func (kv KeyValue) AnyEnc(a *anyenc.Arena) *anyenc.Value {
|
||||
obj := a.NewObject()
|
||||
obj.Set("id", a.NewString(kv.Key))
|
||||
obj.Set("v", kv.Value.AnyEnc(a))
|
||||
obj.Set("t", a.NewNumberInt(kv.TimestampMilli))
|
||||
return obj
|
||||
}
|
||||
|
||||
func (kv KeyValue) Proto() *spacesyncproto.StoreKeyValue {
|
||||
return &spacesyncproto.StoreKeyValue{
|
||||
Key: kv.Key,
|
||||
Value: kv.Value.Value,
|
||||
PeerSignature: kv.Value.PeerSignature,
|
||||
IdentitySignature: kv.Value.IdentitySignature,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
package innerstorage
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
|
||||
anystore "github.com/anyproto/any-store"
|
||||
"github.com/anyproto/any-store/anyenc"
|
||||
|
||||
"github.com/anyproto/any-sync/app/ldiff"
|
||||
"github.com/anyproto/any-sync/commonspace/headsync/headstorage"
|
||||
)
|
||||
|
||||
var (
|
||||
parserPool = &anyenc.ParserPool{}
|
||||
arenaPool = &anyenc.ArenaPool{}
|
||||
)
|
||||
|
||||
type KeyValueStorage interface {
|
||||
Set(ctx context.Context, keyValues ...KeyValue) (err error)
|
||||
Diff() ldiff.CompareDiff
|
||||
Get(ctx context.Context, key string) (keyValue KeyValue, err error)
|
||||
IterateValues(context.Context, func(kv KeyValue) (bool, error)) (err error)
|
||||
}
|
||||
|
||||
type storage struct {
|
||||
diff ldiff.CompareDiff
|
||||
headStorage headstorage.HeadStorage
|
||||
collection anystore.Collection
|
||||
store anystore.DB
|
||||
}
|
||||
|
||||
func New(ctx context.Context, storageName string, headStorage headstorage.HeadStorage, store anystore.DB) (kv KeyValueStorage, err error) {
|
||||
collection, err := store.Collection(ctx, storageName)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tx, err := store.WriteTx(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
_ = tx.Rollback()
|
||||
} else {
|
||||
err = tx.Commit()
|
||||
}
|
||||
}()
|
||||
storage := &storage{
|
||||
headStorage: headStorage,
|
||||
collection: collection,
|
||||
store: store,
|
||||
diff: ldiff.New(32, 256).(ldiff.CompareDiff),
|
||||
}
|
||||
iter, err := storage.collection.Find(nil).Iter(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
_ = iter.Close()
|
||||
}()
|
||||
var (
|
||||
doc anystore.Doc
|
||||
elements []ldiff.Element
|
||||
)
|
||||
for iter.Next() {
|
||||
if doc, err = iter.Doc(); err != nil {
|
||||
return
|
||||
}
|
||||
elements = append(elements, anyEncToElement(doc.Value()))
|
||||
}
|
||||
storage.diff.Set(elements...)
|
||||
hash := storage.diff.Hash()
|
||||
err = headStorage.UpdateEntryTx(tx.Context(), headstorage.HeadsUpdate{
|
||||
Id: storageName,
|
||||
Heads: []string{hash},
|
||||
})
|
||||
return storage, err
|
||||
}
|
||||
|
||||
func (s *storage) Diff() ldiff.CompareDiff {
|
||||
return s.diff
|
||||
}
|
||||
|
||||
func (s *storage) Get(ctx context.Context, key string) (value KeyValue, err error) {
|
||||
doc, err := s.collection.FindId(ctx, key)
|
||||
if err != nil {
|
||||
if errors.Is(err, anystore.ErrDocNotFound) {
|
||||
return KeyValue{}, nil
|
||||
}
|
||||
return
|
||||
}
|
||||
return s.keyValueFromDoc(doc), nil
|
||||
}
|
||||
|
||||
func (s *storage) IterateValues(ctx context.Context, iterFunc func(kv KeyValue) (bool, error)) (err error) {
|
||||
iter, err := s.collection.Find(nil).Iter(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
_ = iter.Close()
|
||||
}()
|
||||
var doc anystore.Doc
|
||||
for iter.Next() {
|
||||
if doc, err = iter.Doc(); err != nil {
|
||||
return
|
||||
}
|
||||
continueIteration, err := iterFunc(s.keyValueFromDoc(doc))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !continueIteration {
|
||||
break
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *storage) keyValueFromDoc(doc anystore.Doc) KeyValue {
|
||||
valueObj := doc.Value().GetObject("v")
|
||||
value := Value{
|
||||
Value: valueObj.Get("v").GetBytes(),
|
||||
PeerSignature: valueObj.Get("p").GetBytes(),
|
||||
IdentitySignature: valueObj.Get("i").GetBytes(),
|
||||
}
|
||||
return KeyValue{
|
||||
Key: doc.Value().GetString("id"),
|
||||
Value: value,
|
||||
TimestampMilli: doc.Value().GetInt("t"),
|
||||
}
|
||||
}
|
||||
|
||||
func (s *storage) init(ctx context.Context) (err error) {
|
||||
s.diff = ldiff.New(32, 256).(ldiff.CompareDiff)
|
||||
iter, err := s.collection.Find(nil).Iter(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
_ = iter.Close()
|
||||
}()
|
||||
var doc anystore.Doc
|
||||
var elements []ldiff.Element
|
||||
for iter.Next() {
|
||||
if doc, err = iter.Doc(); err != nil {
|
||||
return
|
||||
}
|
||||
elements = append(elements, anyEncToElement(doc.Value()))
|
||||
}
|
||||
s.diff.Set(elements...)
|
||||
return
|
||||
}
|
||||
|
||||
func (s *storage) Set(ctx context.Context, values ...KeyValue) (err error) {
|
||||
tx, err := s.collection.WriteTx(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
_ = tx.Rollback()
|
||||
} else {
|
||||
err = tx.Commit()
|
||||
}
|
||||
}()
|
||||
ctx = tx.Context()
|
||||
elements, err := s.updateValues(ctx, values...)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
s.diff.Set(elements...)
|
||||
return
|
||||
}
|
||||
|
||||
func (s *storage) updateValues(ctx context.Context, values ...KeyValue) (elements []ldiff.Element, err error) {
|
||||
parser := parserPool.Get()
|
||||
defer parserPool.Put(parser)
|
||||
arena := arenaPool.Get()
|
||||
defer arenaPool.Put(arena)
|
||||
|
||||
elements = make([]ldiff.Element, 0, len(values))
|
||||
var doc anystore.Doc
|
||||
for _, value := range values {
|
||||
doc, err = s.collection.FindIdWithParser(ctx, parser, value.Key)
|
||||
isNotFound := errors.Is(err, anystore.ErrDocNotFound)
|
||||
if err != nil && !isNotFound {
|
||||
return
|
||||
}
|
||||
if !isNotFound {
|
||||
if doc.Value().GetInt("t") >= value.TimestampMilli {
|
||||
continue
|
||||
}
|
||||
}
|
||||
arena.Reset()
|
||||
val := value.AnyEnc(arena)
|
||||
if err = s.collection.UpsertOne(ctx, val); err != nil {
|
||||
return
|
||||
}
|
||||
elements = append(elements, anyEncToElement(val))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func anyEncToElement(val *anyenc.Value) ldiff.Element {
|
||||
byteRepr := make([]byte, 8)
|
||||
binary.BigEndian.PutUint64(byteRepr, uint64(val.GetInt("t")))
|
||||
return ldiff.Element{
|
||||
Id: val.GetString("id"),
|
||||
Head: string(byteRepr),
|
||||
}
|
||||
}
|
37
commonspace/object/keyvalue/keyvaluestorage/storage.go
Normal file
37
commonspace/object/keyvalue/keyvaluestorage/storage.go
Normal file
|
@ -0,0 +1,37 @@
|
|||
package keyvaluestorage
|
||||
|
||||
import (
|
||||
"github.com/anyproto/any-sync/commonspace/object/keyvalue/keyvaluestorage/innerstorage"
|
||||
"github.com/anyproto/any-sync/commonspace/spacesyncproto"
|
||||
)
|
||||
|
||||
type Storage interface {
|
||||
Set(key string, value []byte) error
|
||||
SetRaw(keyValue *spacesyncproto.StoreKeyValue) error
|
||||
GetAll(key string) (values []innerstorage.KeyValue, err error)
|
||||
InnerStorage() innerstorage.KeyValueStorage
|
||||
}
|
||||
//
|
||||
//type storage struct {
|
||||
//
|
||||
//}
|
||||
//
|
||||
//func (s *storage) Set(key string, value []byte) error {
|
||||
// //TODO implement me
|
||||
// panic("implement me")
|
||||
//}
|
||||
//
|
||||
//func (s *storage) SetRaw(keyValue *spacesyncproto.StoreKeyValue) error {
|
||||
// //TODO implement me
|
||||
// panic("implement me")
|
||||
//}
|
||||
//
|
||||
//func (s *storage) GetAll(key string) (values []innerstorage.KeyValue, err error) {
|
||||
// //TODO implement me
|
||||
// panic("implement me")
|
||||
//}
|
||||
//
|
||||
//func (s *storage) InnerStorage() innerstorage.KeyValueStorage {
|
||||
// //TODO implement me
|
||||
// panic("implement me")
|
||||
//}
|
|
@ -1,129 +0,0 @@
|
|||
package keyvaluestore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"strconv"
|
||||
|
||||
anystore "github.com/anyproto/any-store"
|
||||
"github.com/anyproto/any-store/anyenc"
|
||||
|
||||
"github.com/anyproto/any-sync/app/ldiff"
|
||||
"github.com/anyproto/any-sync/commonspace/object/keyvalue"
|
||||
)
|
||||
|
||||
var (
|
||||
parserPool = &anyenc.ParserPool{}
|
||||
arenaPool = &anyenc.ArenaPool{}
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
any-store document structure:
|
||||
id (string) - key
|
||||
v (bytes) - value
|
||||
h (string) - value hash
|
||||
t (int) - timestamp
|
||||
d (bool) - isDeleted
|
||||
*/
|
||||
|
||||
func NewKeyValueStore(ctx context.Context, collection anystore.Collection) (KeyValueStore, error) {
|
||||
k := &keyValueStore{collection: collection}
|
||||
if err := k.init(ctx); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return k, nil
|
||||
}
|
||||
|
||||
type KeyValueStore interface {
|
||||
Set(ctx context.Context, values ...keyvalue.KeyValue) (err error)
|
||||
ldiff.Remote
|
||||
}
|
||||
|
||||
type keyValueStore struct {
|
||||
collection anystore.Collection
|
||||
ldiff.Diff
|
||||
}
|
||||
|
||||
func (k *keyValueStore) init(ctx context.Context) (err error) {
|
||||
k.Diff = ldiff.New(32, 256)
|
||||
iter, err := k.collection.Find(nil).Iter(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
_ = iter.Close()
|
||||
}()
|
||||
var doc anystore.Doc
|
||||
for iter.Next() {
|
||||
if doc, err = iter.Doc(); err != nil {
|
||||
return
|
||||
}
|
||||
k.Diff.Set(anyEncToElement(doc.Value()))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (k *keyValueStore) Set(ctx context.Context, values ...keyvalue.KeyValue) (err error) {
|
||||
elements, err := k.updateValues(ctx, values...)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
k.Diff.Set(elements...)
|
||||
return
|
||||
}
|
||||
|
||||
func (k *keyValueStore) updateValues(ctx context.Context, values ...keyvalue.KeyValue) (elements []ldiff.Element, err error) {
|
||||
tx, err := k.collection.WriteTx(ctx)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
_ = tx.Rollback()
|
||||
} else {
|
||||
err = tx.Commit()
|
||||
}
|
||||
}()
|
||||
ctx = tx.Context()
|
||||
parser := parserPool.Get()
|
||||
defer parserPool.Put(parser)
|
||||
arena := arenaPool.Get()
|
||||
defer arenaPool.Put(arena)
|
||||
|
||||
elements = make([]ldiff.Element, 0, len(values))
|
||||
var doc anystore.Doc
|
||||
for _, value := range values {
|
||||
doc, err = k.collection.FindIdWithParser(ctx, parser, value.Key)
|
||||
isNotFound := errors.Is(err, anystore.ErrDocNotFound)
|
||||
if err != nil && !isNotFound {
|
||||
return
|
||||
}
|
||||
if !isNotFound {
|
||||
if doc.Value().GetInt("t") >= value.TimestampMilli {
|
||||
// newest doc is already present
|
||||
continue
|
||||
}
|
||||
}
|
||||
arena.Reset()
|
||||
val := value.AnyEnc(arena)
|
||||
if err = k.collection.UpsertOne(ctx, val); err != nil {
|
||||
return
|
||||
}
|
||||
elements = append(elements, anyEncToElement(val))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func anyEncToElement(val *anyenc.Value) ldiff.Element {
|
||||
head := strconv.Itoa(val.GetInt("t")) + "/"
|
||||
if val.GetBool("d") {
|
||||
head += "del"
|
||||
} else {
|
||||
head += val.GetString("h")
|
||||
}
|
||||
return ldiff.Element{
|
||||
Id: val.GetString("id"),
|
||||
Head: head,
|
||||
}
|
||||
}
|
|
@ -1,146 +0,0 @@
|
|||
package keyvaluestore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
anystore "github.com/anyproto/any-store"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/anyproto/any-sync/commonspace/object/keyvalue"
|
||||
)
|
||||
|
||||
var ctx = context.Background()
|
||||
|
||||
func TestKeyValueStore_Set(t *testing.T) {
|
||||
var values = []keyvalue.KeyValue{
|
||||
{
|
||||
Key: "1",
|
||||
Value: []byte("1"),
|
||||
TimestampMilli: 1,
|
||||
},
|
||||
{
|
||||
Key: "2",
|
||||
Value: []byte("2"),
|
||||
TimestampMilli: 1,
|
||||
},
|
||||
{
|
||||
Key: "3",
|
||||
Value: []byte("4"),
|
||||
TimestampMilli: 1,
|
||||
},
|
||||
}
|
||||
|
||||
t.Run("new", func(t *testing.T) {
|
||||
fx := newFixture(t)
|
||||
err := fx.Set(ctx, values...)
|
||||
assert.NoError(t, err)
|
||||
count, _ := fx.coll.Count(ctx)
|
||||
assert.Equal(t, 3, count)
|
||||
assert.Equal(t, 3, fx.Diff.Len())
|
||||
})
|
||||
t.Run("restore", func(t *testing.T) {
|
||||
fx := newFixture(t)
|
||||
err := fx.Set(ctx, values...)
|
||||
assert.NoError(t, err)
|
||||
hash := fx.Diff.Hash()
|
||||
kv2, err := NewKeyValueStore(ctx, fx.coll)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, kv2.(*keyValueStore).Diff.Hash(), hash)
|
||||
})
|
||||
t.Run("update", func(t *testing.T) {
|
||||
fx := newFixture(t)
|
||||
err := fx.Set(ctx, values...)
|
||||
assert.NoError(t, err)
|
||||
hash := fx.Diff.Hash()
|
||||
|
||||
// do not update because timestamp is not greater
|
||||
require.NoError(t, fx.Set(ctx, keyvalue.KeyValue{Key: "1", TimestampMilli: 1}))
|
||||
assert.Equal(t, hash, fx.Diff.Hash())
|
||||
// should be updated
|
||||
require.NoError(t, fx.Set(ctx, keyvalue.KeyValue{Key: "2", TimestampMilli: 2, Value: []byte("22")}))
|
||||
assert.NotEqual(t, hash, fx.Diff.Hash())
|
||||
})
|
||||
t.Run("delete", func(t *testing.T) {
|
||||
fx := newFixture(t)
|
||||
err := fx.Set(ctx, values...)
|
||||
assert.NoError(t, err)
|
||||
hash := fx.Diff.Hash()
|
||||
|
||||
require.NoError(t, fx.Set(ctx, keyvalue.KeyValue{Key: "1", TimestampMilli: 3}))
|
||||
assert.NotEqual(t, hash, fx.Diff.Hash())
|
||||
})
|
||||
}
|
||||
|
||||
func TestKeyValueStore_E2E(t *testing.T) {
|
||||
fx1 := newFixture(t)
|
||||
fx2 := newFixture(t)
|
||||
|
||||
newIds, changedIds, remodedIds, err := fx1.Diff.Diff(ctx, fx2)
|
||||
require.NoError(t, err)
|
||||
assert.Len(t, newIds, 0)
|
||||
assert.Len(t, changedIds, 0)
|
||||
assert.Len(t, remodedIds, 0)
|
||||
|
||||
require.NoError(t, fx1.Set(ctx, []keyvalue.KeyValue{
|
||||
{Key: "1", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "2", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "3", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "4", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "5", Value: []byte("1"), TimestampMilli: 1},
|
||||
}...))
|
||||
|
||||
newIds, changedIds, remodedIds, err = fx1.Diff.Diff(ctx, fx2)
|
||||
require.NoError(t, err)
|
||||
assert.Len(t, newIds, 0)
|
||||
assert.Len(t, changedIds, 0)
|
||||
assert.Len(t, remodedIds, 5)
|
||||
|
||||
require.NoError(t, fx2.Set(ctx, []keyvalue.KeyValue{
|
||||
{Key: "1", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "2", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "3", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "4", Value: []byte("1"), TimestampMilli: 1},
|
||||
{Key: "5", Value: []byte("1"), TimestampMilli: 1},
|
||||
}...))
|
||||
|
||||
newIds, changedIds, remodedIds, err = fx1.Diff.Diff(ctx, fx2)
|
||||
require.NoError(t, err)
|
||||
assert.Len(t, newIds, 0)
|
||||
assert.Len(t, changedIds, 0)
|
||||
assert.Len(t, remodedIds, 0)
|
||||
}
|
||||
|
||||
func newFixture(t testing.TB) *fixture {
|
||||
tmpDir, err := os.MkdirTemp("", "")
|
||||
require.NoError(t, err)
|
||||
db, err := anystore.Open(ctx, filepath.Join(tmpDir, "test.db"), nil)
|
||||
require.NoError(t, err)
|
||||
coll, err := db.Collection(ctx, "test")
|
||||
require.NoError(t, err)
|
||||
kv, err := NewKeyValueStore(ctx, coll)
|
||||
require.NoError(t, err)
|
||||
fx := &fixture{
|
||||
keyValueStore: kv.(*keyValueStore),
|
||||
db: db,
|
||||
coll: coll,
|
||||
}
|
||||
t.Cleanup(func() {
|
||||
fx.finish(t)
|
||||
_ = os.RemoveAll(tmpDir)
|
||||
})
|
||||
return fx
|
||||
}
|
||||
|
||||
type fixture struct {
|
||||
*keyValueStore
|
||||
db anystore.DB
|
||||
coll anystore.Collection
|
||||
}
|
||||
|
||||
func (fx *fixture) finish(t testing.TB) {
|
||||
assert.NoError(t, fx.db.Close())
|
||||
}
|
|
@ -211,7 +211,16 @@ message StoreDiffResponse {
|
|||
message StoreKeyValue {
|
||||
string key = 1;
|
||||
bytes value = 2;
|
||||
int64 timestampMilli = 3;
|
||||
bytes identitySignature = 3;
|
||||
bytes peerSignature = 4;
|
||||
}
|
||||
|
||||
message StoreKeyInner {
|
||||
bytes peer = 1;
|
||||
bytes identity = 2;
|
||||
bytes value = 3;
|
||||
int64 timestampMilli = 4;
|
||||
string aclHeadId = 5;
|
||||
}
|
||||
|
||||
// DiffType is a type of diff
|
||||
|
|
|
@ -1790,7 +1790,8 @@ func (m *StoreDiffResponse) GetResults() []*HeadSyncResult {
|
|||
type StoreKeyValue struct {
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
TimestampMilli int64 `protobuf:"varint,3,opt,name=timestampMilli,proto3" json:"timestampMilli,omitempty"`
|
||||
IdentitySignature []byte `protobuf:"bytes,3,opt,name=identitySignature,proto3" json:"identitySignature,omitempty"`
|
||||
PeerSignature []byte `protobuf:"bytes,4,opt,name=peerSignature,proto3" json:"peerSignature,omitempty"`
|
||||
}
|
||||
|
||||
func (m *StoreKeyValue) Reset() { *m = StoreKeyValue{} }
|
||||
|
@ -1848,13 +1849,104 @@ func (m *StoreKeyValue) GetValue() []byte {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *StoreKeyValue) GetTimestampMilli() int64 {
|
||||
func (m *StoreKeyValue) GetIdentitySignature() []byte {
|
||||
if m != nil {
|
||||
return m.IdentitySignature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *StoreKeyValue) GetPeerSignature() []byte {
|
||||
if m != nil {
|
||||
return m.PeerSignature
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type StoreKeyInner struct {
|
||||
Peer []byte `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
|
||||
Identity []byte `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"`
|
||||
Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
|
||||
TimestampMilli int64 `protobuf:"varint,4,opt,name=timestampMilli,proto3" json:"timestampMilli,omitempty"`
|
||||
AclHeadId string `protobuf:"bytes,5,opt,name=aclHeadId,proto3" json:"aclHeadId,omitempty"`
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) Reset() { *m = StoreKeyInner{} }
|
||||
func (m *StoreKeyInner) String() string { return proto.CompactTextString(m) }
|
||||
func (*StoreKeyInner) ProtoMessage() {}
|
||||
func (*StoreKeyInner) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_80e49f1f4ac27799, []int{27}
|
||||
}
|
||||
func (m *StoreKeyInner) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *StoreKeyInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_StoreKeyInner.Marshal(b, m, deterministic)
|
||||
} else {
|
||||
b = b[:cap(b)]
|
||||
n, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b[:n], nil
|
||||
}
|
||||
}
|
||||
func (m *StoreKeyInner) XXX_MarshalAppend(b []byte, newLen int) ([]byte, error) {
|
||||
b = b[:newLen]
|
||||
_, err := m.MarshalToSizedBuffer(b)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return b, nil
|
||||
}
|
||||
func (m *StoreKeyInner) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_StoreKeyInner.Merge(m, src)
|
||||
}
|
||||
func (m *StoreKeyInner) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *StoreKeyInner) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_StoreKeyInner.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_StoreKeyInner proto.InternalMessageInfo
|
||||
|
||||
func (m *StoreKeyInner) GetPeer() []byte {
|
||||
if m != nil {
|
||||
return m.Peer
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) GetIdentity() []byte {
|
||||
if m != nil {
|
||||
return m.Identity
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) GetValue() []byte {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) GetTimestampMilli() int64 {
|
||||
if m != nil {
|
||||
return m.TimestampMilli
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) GetAclHeadId() string {
|
||||
if m != nil {
|
||||
return m.AclHeadId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("spacesync.ErrCodes", ErrCodes_name, ErrCodes_value)
|
||||
proto.RegisterEnum("spacesync.SpaceSubscriptionAction", SpaceSubscriptionAction_name, SpaceSubscriptionAction_value)
|
||||
|
@ -1886,6 +1978,7 @@ func init() {
|
|||
proto.RegisterType((*StoreDiffRequest)(nil), "spacesync.StoreDiffRequest")
|
||||
proto.RegisterType((*StoreDiffResponse)(nil), "spacesync.StoreDiffResponse")
|
||||
proto.RegisterType((*StoreKeyValue)(nil), "spacesync.StoreKeyValue")
|
||||
proto.RegisterType((*StoreKeyInner)(nil), "spacesync.StoreKeyInner")
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
@ -1893,95 +1986,99 @@ func init() {
|
|||
}
|
||||
|
||||
var fileDescriptor_80e49f1f4ac27799 = []byte{
|
||||
// 1399 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcf, 0x6f, 0xdb, 0xb6,
|
||||
0x17, 0xb7, 0xe4, 0xc4, 0xb1, 0x5f, 0x1c, 0x57, 0x65, 0xdc, 0xc6, 0x5f, 0xb7, 0x70, 0x0d, 0xe2,
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b9, 0x4b, 0x77, 0x57, 0xf7, 0x89,
|
||||
0x66, 0xff, 0x1f, 0x56, 0x3c, 0xf5, 0x15, 0x1f, 0x32, 0x16, 0x67, 0x13, 0xab, 0x48, 0xc4, 0xdf,
|
||||
0xc0, 0x95, 0x42, 0xc0, 0xc3, 0x90, 0x8e, 0xf9, 0x69, 0x24, 0xe4, 0x35, 0x49, 0x24, 0xbd, 0x81,
|
||||
0x97, 0x4c, 0xda, 0x06, 0x31, 0x28, 0xe7, 0xe1, 0xed, 0x32, 0xf8, 0x1f, 0x2d, 0x68, 0xa6, 0xd0,
|
||||
0x3b, 0x54, 0x50, 0x74, 0x0f, 0x96, 0xdc, 0x24, 0xa7, 0x7a, 0x7a, 0xdf, 0x98, 0xcd, 0xc2, 0x4c,
|
||||
0xea, 0x49, 0x2a, 0x2f, 0x9f, 0x4b, 0xae, 0xbd, 0xd3, 0x19, 0xec, 0xcf, 0xd3, 0x4d, 0xa3, 0x20,
|
||||
0x99, 0x06, 0x7e, 0xa9, 0x47, 0xd2, 0x70, 0x72, 0xc4, 0xdd, 0xd8, 0x1f, 0xcb, 0x76, 0x96, 0x77,
|
||||
0x49, 0x0f, 0xf0, 0x34, 0xc4, 0xec, 0x8c, 0xee, 0x43, 0x8d, 0xba, 0x52, 0x4a, 0x3f, 0x18, 0xf8,
|
||||
0x9c, 0x31, 0x03, 0x69, 0x4b, 0x49, 0x12, 0xad, 0x81, 0x07, 0xb0, 0xba, 0xe5, 0x06, 0x5b, 0x9e,
|
||||
0x47, 0x98, 0x1b, 0xc5, 0xde, 0xbf, 0xbf, 0xa5, 0xc6, 0x33, 0x60, 0x17, 0x9e, 0x01, 0xfc, 0x15,
|
||||
0xb4, 0x8b, 0x50, 0x7a, 0x9a, 0x76, 0xa1, 0x1e, 0x2b, 0x4a, 0x06, 0x96, 0x9d, 0xdf, 0x83, 0xf6,
|
||||
0xa5, 0x42, 0x7b, 0xc4, 0x44, 0x82, 0xc6, 0x3f, 0xc8, 0x33, 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x5d, 0xbd, 0x8a, 0x0e, 0xcd, 0xec, 0x7d, 0x45, 0x87, 0x66,
|
||||
0xb7, 0x35, 0x03, 0x27, 0x08, 0xca, 0x70, 0xb2, 0x1d, 0xae, 0x0c, 0xc7, 0x58, 0xde, 0x08, 0x38,
|
||||
0xf9, 0x3a, 0x3c, 0x14, 0x31, 0xa3, 0x23, 0x74, 0xfd, 0xdc, 0xf3, 0x67, 0xec, 0xca, 0xdd, 0xf7,
|
||||
0x72, 0x55, 0x8c, 0x7b, 0x00, 0x39, 0xe3, 0x22, 0x68, 0xe8, 0x05, 0xac, 0xe5, 0x44, 0x1d, 0xd0,
|
||||
0xc5, 0x9d, 0xbc, 0x63, 0xa1, 0x03, 0x68, 0x9a, 0xd3, 0x17, 0xf5, 0x0c, 0xf9, 0x92, 0x09, 0xdf,
|
||||
0xbd, 0x31, 0x97, 0x9f, 0xe5, 0x71, 0xa5, 0x30, 0x34, 0xd1, 0x8c, 0xc6, 0xb9, 0xd1, 0xdc, 0xed,
|
||||
0xcf, 0x17, 0x48, 0x30, 0x1f, 0x7c, 0xf2, 0xfb, 0xdb, 0x9e, 0xf5, 0xe6, 0x6d, 0xcf, 0xfa, 0xeb,
|
||||
0x6d, 0xcf, 0xfa, 0xe5, 0x5d, 0xaf, 0xf2, 0xe6, 0x5d, 0xaf, 0xf2, 0xe7, 0xbb, 0x5e, 0xe5, 0xeb,
|
||||
0xee, 0xfc, 0x7f, 0x96, 0x8f, 0x6a, 0xea, 0xe7, 0xee, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc2,
|
||||
0xb4, 0x95, 0xdb, 0x51, 0x0f, 0x00, 0x00,
|
||||
// 1458 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x17, 0x4b, 0x6f, 0xdb, 0x46,
|
||||
0x53, 0xa4, 0x6c, 0x59, 0x1a, 0xcb, 0x0a, 0xbd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 0x9c, 0x66, 0x08, 0x2e, 0x17, 0x93, 0x71, 0x30, 0x1d, 0x78, 0x22,
|
||||
0xee, 0x06, 0x4e, 0x41, 0x4e, 0x19, 0x3b, 0xd3, 0x20, 0x72, 0x3c, 0xd1, 0x44, 0x4d, 0x9c, 0x82,
|
||||
0xbc, 0xbf, 0x22, 0xe1, 0xc0, 0xc0, 0xeb, 0x2c, 0x0a, 0x21, 0x05, 0xdb, 0x04, 0xac, 0x21, 0x37,
|
||||
0x7c, 0x34, 0xa1, 0x67, 0x69, 0xa1, 0x36, 0x33, 0x4d, 0xdc, 0xb7, 0xe5, 0xad, 0x75, 0x2d, 0xc2,
|
||||
0x84, 0x3b, 0x21, 0x67, 0x26, 0x7a, 0x00, 0x3b, 0x31, 0xf1, 0x48, 0xc8, 0x7c, 0x27, 0x10, 0x5e,
|
||||
0x37, 0xb1, 0x86, 0xb1, 0xd7, 0x60, 0x55, 0x33, 0x93, 0xe4, 0xdf, 0xb6, 0x95, 0xed, 0x20, 0x48,
|
||||
0x6d, 0x17, 0x9a, 0xcb, 0x7e, 0xa8, 0x04, 0x39, 0x8f, 0x2c, 0xdc, 0x7f, 0x77, 0xd0, 0xfe, 0xde,
|
||||
0x84, 0xa6, 0x4e, 0x41, 0xdb, 0xb0, 0x2c, 0x64, 0x78, 0x9d, 0x49, 0x2c, 0xf5, 0x5c, 0xd7, 0xf4,
|
||||
0x60, 0xe7, 0xf5, 0x30, 0x63, 0x78, 0xe1, 0xb3, 0xb3, 0x81, 0x87, 0x75, 0x19, 0x1e, 0xb4, 0xe3,
|
||||
0x06, 0x52, 0x61, 0x1a, 0x74, 0x86, 0x41, 0x36, 0x34, 0x33, 0x48, 0x15, 0x2c, 0x87, 0x43, 0x5b,
|
||||
0xd0, 0x16, 0x2a, 0x87, 0x84, 0x31, 0x3f, 0x3c, 0xa5, 0x47, 0xb9, 0x12, 0x96, 0xd2, 0xd0, 0xa7,
|
||||
0x70, 0xa5, 0x0c, 0xaf, 0xaa, 0x3b, 0x87, 0x6a, 0xff, 0x61, 0xc0, 0xb2, 0x16, 0x12, 0xef, 0x0b,
|
||||
0x5f, 0x14, 0x88, 0x4d, 0xe5, 0x34, 0x51, 0x30, 0xef, 0x42, 0xe6, 0x8f, 0x08, 0x65, 0xce, 0x68,
|
||||
0x2c, 0x42, 0xab, 0xe2, 0x0c, 0xc1, 0xa9, 0xc2, 0x86, 0x7a, 0x7f, 0x0d, 0x9c, 0x21, 0xd0, 0x0d,
|
||||
0x68, 0xf1, 0xa6, 0xf4, 0x5d, 0x87, 0xf9, 0x51, 0xf8, 0x98, 0x4c, 0x45, 0x34, 0x0b, 0xb8, 0x80,
|
||||
0xe5, 0x83, 0x83, 0x12, 0x92, 0x78, 0xdd, 0xc4, 0xe2, 0x1b, 0xdd, 0x02, 0xa4, 0xa5, 0x38, 0xcd,
|
||||
0x46, 0x4d, 0x70, 0x94, 0x50, 0xec, 0x23, 0x68, 0xe5, 0x0b, 0x85, 0xfa, 0xb3, 0x85, 0x6d, 0xe6,
|
||||
0xeb, 0xc6, 0xbd, 0xf7, 0x4f, 0x43, 0x87, 0x4d, 0x62, 0x22, 0xcb, 0x96, 0x21, 0xec, 0x5d, 0x68,
|
||||
0x97, 0x95, 0x5e, 0xbc, 0x4b, 0xe7, 0x75, 0x4e, 0x6b, 0x86, 0x90, 0x7d, 0x6b, 0xaa, 0xbe, 0xfd,
|
||||
0xd5, 0x80, 0xf6, 0x50, 0x2f, 0xc3, 0x4e, 0x14, 0x32, 0x3e, 0x3d, 0xbf, 0x80, 0x66, 0xf2, 0xf8,
|
||||
0x76, 0x49, 0x40, 0x18, 0x29, 0x69, 0xe0, 0x43, 0x8d, 0xbc, 0x5f, 0xc1, 0x39, 0x76, 0x74, 0x5f,
|
||||
0x46, 0x27, 0xa5, 0x4d, 0x21, 0x7d, 0xa5, 0xd8, 0xfe, 0x4a, 0x58, 0x67, 0x7e, 0xb0, 0x04, 0x8b,
|
||||
0xaf, 0x9c, 0x60, 0x42, 0xec, 0x1e, 0x34, 0x75, 0x23, 0x33, 0x8f, 0xee, 0xae, 0xec, 0x13, 0x49,
|
||||
0xfe, 0x3f, 0xac, 0x78, 0xe2, 0x2b, 0x3e, 0x22, 0x24, 0x56, 0x13, 0x2b, 0x8f, 0xb4, 0xbf, 0x81,
|
||||
0xcb, 0xb9, 0x80, 0x87, 0xa1, 0x33, 0xa6, 0x67, 0x11, 0xe3, 0xcf, 0x24, 0xe1, 0xf4, 0x06, 0x5e,
|
||||
0x32, 0x69, 0x1b, 0x58, 0xc3, 0xcc, 0xaa, 0x37, 0xcb, 0xd4, 0xff, 0x60, 0x40, 0x33, 0x55, 0xbd,
|
||||
0xeb, 0x30, 0x07, 0xdd, 0x83, 0x25, 0x37, 0xc9, 0xa9, 0x9c, 0xde, 0xd7, 0x8b, 0x59, 0x28, 0xa4,
|
||||
0x1e, 0xa7, 0xfc, 0x7c, 0x5d, 0x52, 0xe9, 0x9d, 0xcc, 0x60, 0x7f, 0x9e, 0x6c, 0x1a, 0x05, 0x56,
|
||||
0x12, 0xf6, 0x4b, 0x39, 0x92, 0x86, 0x93, 0x63, 0xea, 0xc6, 0xfe, 0x98, 0xb7, 0x33, 0x7f, 0x4b,
|
||||
0x72, 0x80, 0xa7, 0x21, 0x2a, 0x18, 0xdd, 0x87, 0x9a, 0xe3, 0x72, 0x2e, 0xb9, 0x30, 0xec, 0x19,
|
||||
0x63, 0x9a, 0xa6, 0x6d, 0xc1, 0x89, 0xa5, 0x84, 0x3d, 0x80, 0xb5, 0x6d, 0x37, 0xd8, 0xf6, 0x3c,
|
||||
0x4c, 0xdc, 0x28, 0xf6, 0xfe, 0x7d, 0x97, 0x6a, 0x6b, 0xc0, 0xcc, 0xad, 0x01, 0xfb, 0x2b, 0x68,
|
||||
0xe7, 0x55, 0xc9, 0x69, 0xda, 0x85, 0x7a, 0x2c, 0x30, 0x4a, 0x99, 0x82, 0xdf, 0xa3, 0xed, 0x4b,
|
||||
0xa1, 0xed, 0x11, 0x61, 0x89, 0x36, 0xfa, 0x41, 0x9e, 0x39, 0x6e, 0xb0, 0x9f, 0x9d, 0x0a, 0x29,
|
||||
0x68, 0x6f, 0xc2, 0xe5, 0x82, 0x2e, 0xe9, 0x9a, 0xd8, 0x76, 0x02, 0x25, 0x92, 0xda, 0xc4, 0x29,
|
||||
0x68, 0xef, 0x82, 0x35, 0x64, 0x51, 0x4c, 0xf8, 0xc2, 0x4d, 0x4d, 0x67, 0x67, 0x44, 0xf5, 0xc3,
|
||||
0xce, 0x08, 0x7b, 0x1f, 0x56, 0x35, 0x2d, 0x17, 0x38, 0x0b, 0xec, 0x1f, 0x0d, 0x58, 0x11, 0xaa,
|
||||
0x1e, 0x93, 0xe9, 0x73, 0xfe, 0xc8, 0x90, 0x05, 0xd5, 0x97, 0x64, 0x2a, 0x93, 0xc0, 0x3f, 0xf9,
|
||||
0x9d, 0x25, 0xde, 0x9f, 0x4c, 0x65, 0x02, 0xa0, 0x8f, 0x61, 0x35, 0x9d, 0xba, 0x43, 0x35, 0x95,
|
||||
0xaa, 0x82, 0x63, 0x96, 0xc0, 0x1f, 0xcb, 0x98, 0x90, 0x38, 0xe3, 0x4c, 0x16, 0x45, 0x1e, 0xc9,
|
||||
0x6f, 0x0e, 0xe5, 0xcd, 0x20, 0x0c, 0x49, 0xcc, 0x67, 0x2d, 0x67, 0x49, 0xaf, 0x46, 0xfe, 0x9d,
|
||||
0x9b, 0xff, 0x66, 0x61, 0xfe, 0x2b, 0x5f, 0xab, 0xba, 0xaf, 0x37, 0xa0, 0xa5, 0x96, 0xc0, 0x81,
|
||||
0x1f, 0x04, 0xbe, 0x30, 0x5f, 0xc5, 0x05, 0x2c, 0x9f, 0x95, 0xb2, 0xb6, 0x6a, 0x29, 0x65, 0x88,
|
||||
0x9b, 0x7f, 0x1b, 0x50, 0xdf, 0x8b, 0xe3, 0x9d, 0xc8, 0x23, 0x14, 0xb5, 0x00, 0x9e, 0x85, 0xe4,
|
||||
0x7c, 0x4c, 0x5c, 0x46, 0x3c, 0xab, 0x82, 0x2c, 0xb9, 0xa7, 0x0f, 0x7c, 0x4a, 0xfd, 0xf0, 0xd4,
|
||||
0x32, 0xd0, 0x25, 0x39, 0x8d, 0xf6, 0xce, 0x7d, 0xca, 0xa8, 0x65, 0xa2, 0x35, 0xb8, 0x24, 0x10,
|
||||
0x4f, 0x22, 0x36, 0x08, 0x77, 0x1c, 0xf7, 0x8c, 0x58, 0x55, 0x84, 0xa0, 0x25, 0x90, 0x03, 0x9a,
|
||||
0x4c, 0x2d, 0xcf, 0x5a, 0x40, 0x1d, 0x68, 0x8b, 0xe9, 0x41, 0x9f, 0x44, 0x4c, 0x96, 0xd7, 0x3f,
|
||||
0x0e, 0x88, 0xb5, 0x88, 0xda, 0x60, 0x61, 0xe2, 0x12, 0x7f, 0xcc, 0x06, 0x74, 0x10, 0xbe, 0x72,
|
||||
0x02, 0xdf, 0xb3, 0x6a, 0x5c, 0x87, 0x04, 0xe4, 0x7a, 0xb1, 0x96, 0x38, 0xe7, 0xee, 0x24, 0x59,
|
||||
0x5b, 0x44, 0x36, 0x9a, 0x55, 0x47, 0x57, 0x61, 0xfd, 0x69, 0x14, 0x1d, 0x38, 0xe1, 0x54, 0xe2,
|
||||
0xe8, 0xc3, 0x38, 0x1a, 0x71, 0x63, 0x56, 0x83, 0x3b, 0xbc, 0x17, 0xc7, 0x51, 0x7c, 0x78, 0x72,
|
||||
0x42, 0x09, 0xb3, 0xbc, 0x9b, 0xf7, 0x60, 0x7d, 0xce, 0x3b, 0x47, 0x2b, 0xd0, 0x90, 0xd8, 0x63,
|
||||
0x62, 0x55, 0xb8, 0xe8, 0xb3, 0x90, 0x2a, 0x84, 0x71, 0xf3, 0x23, 0xa8, 0xa7, 0x37, 0x25, 0x5a,
|
||||
0x86, 0xa5, 0x41, 0xe8, 0xf3, 0x7b, 0xca, 0xaa, 0xa0, 0x1a, 0x98, 0xcf, 0x37, 0x2d, 0x43, 0xfc,
|
||||
0xdf, 0xb2, 0x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, 0x55, 0xde, 0xbc, 0xeb, 0x55, 0xfe, 0x7c, 0xd7, 0xab, 0x7c, 0xdd, 0x9d, 0xff, 0xbb, 0xff,
|
||||
0xb8, 0x26, 0xfe, 0xdd, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x64, 0xaf, 0x73, 0x0c, 0x1c, 0x10,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *HeadSyncRange) Marshal() (dAtA []byte, err error) {
|
||||
|
@ -3091,10 +3188,19 @@ func (m *StoreKeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.TimestampMilli != 0 {
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(m.TimestampMilli))
|
||||
if len(m.PeerSignature) > 0 {
|
||||
i -= len(m.PeerSignature)
|
||||
copy(dAtA[i:], m.PeerSignature)
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(len(m.PeerSignature)))
|
||||
i--
|
||||
dAtA[i] = 0x18
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if len(m.IdentitySignature) > 0 {
|
||||
i -= len(m.IdentitySignature)
|
||||
copy(dAtA[i:], m.IdentitySignature)
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(len(m.IdentitySignature)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Value) > 0 {
|
||||
i -= len(m.Value)
|
||||
|
@ -3113,6 +3219,62 @@ func (m *StoreKeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.AclHeadId) > 0 {
|
||||
i -= len(m.AclHeadId)
|
||||
copy(dAtA[i:], m.AclHeadId)
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(len(m.AclHeadId)))
|
||||
i--
|
||||
dAtA[i] = 0x2a
|
||||
}
|
||||
if m.TimestampMilli != 0 {
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(m.TimestampMilli))
|
||||
i--
|
||||
dAtA[i] = 0x20
|
||||
}
|
||||
if len(m.Value) > 0 {
|
||||
i -= len(m.Value)
|
||||
copy(dAtA[i:], m.Value)
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Value)))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if len(m.Identity) > 0 {
|
||||
i -= len(m.Identity)
|
||||
copy(dAtA[i:], m.Identity)
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Identity)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Peer) > 0 {
|
||||
i -= len(m.Peer)
|
||||
copy(dAtA[i:], m.Peer)
|
||||
i = encodeVarintSpacesync(dAtA, i, uint64(len(m.Peer)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintSpacesync(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovSpacesync(v)
|
||||
base := offset
|
||||
|
@ -3627,9 +3789,42 @@ func (m *StoreKeyValue) Size() (n int) {
|
|||
if l > 0 {
|
||||
n += 1 + l + sovSpacesync(uint64(l))
|
||||
}
|
||||
l = len(m.IdentitySignature)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovSpacesync(uint64(l))
|
||||
}
|
||||
l = len(m.PeerSignature)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovSpacesync(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *StoreKeyInner) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Peer)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovSpacesync(uint64(l))
|
||||
}
|
||||
l = len(m.Identity)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovSpacesync(uint64(l))
|
||||
}
|
||||
l = len(m.Value)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovSpacesync(uint64(l))
|
||||
}
|
||||
if m.TimestampMilli != 0 {
|
||||
n += 1 + sovSpacesync(uint64(m.TimestampMilli))
|
||||
}
|
||||
l = len(m.AclHeadId)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovSpacesync(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
|
@ -6790,6 +6985,226 @@ func (m *StoreKeyValue) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field IdentitySignature", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSpacesync
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.IdentitySignature = append(m.IdentitySignature[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.IdentitySignature == nil {
|
||||
m.IdentitySignature = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field PeerSignature", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSpacesync
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.PeerSignature = append(m.PeerSignature[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.PeerSignature == nil {
|
||||
m.PeerSignature = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipSpacesync(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *StoreKeyInner) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSpacesync
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: StoreKeyInner: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: StoreKeyInner: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Peer", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSpacesync
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Peer = append(m.Peer[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Peer == nil {
|
||||
m.Peer = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSpacesync
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Identity = append(m.Identity[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Identity == nil {
|
||||
m.Identity = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSpacesync
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Value == nil {
|
||||
m.Value = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 4:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field TimestampMilli", wireType)
|
||||
}
|
||||
|
@ -6808,6 +7223,38 @@ func (m *StoreKeyValue) Unmarshal(dAtA []byte) error {
|
|||
break
|
||||
}
|
||||
}
|
||||
case 5:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field AclHeadId", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowSpacesync
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthSpacesync
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.AclHeadId = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipSpacesync(dAtA[iNdEx:])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue