Documentation ¶
Overview ¶
Package state is a generated protocol buffer package.
It is generated from these files:
types.proto
It has these top-level messages:
MockedEntry MockedEntryList
Index ¶
- Variables
- type Backend
- type Dataset
- type Entry
- type EntrySet
- type MockedBackend
- func (m MockedBackend) DecodeSet(buf []byte) (EntrySet, error)
- func (m MockedBackend) DeleteEntry(e Entry) error
- func (m MockedBackend) Dump() EntrySet
- func (m MockedBackend) EntryByID(id string) (Entry, error)
- func (m MockedBackend) InsertEntries(e EntrySet) error
- func (m MockedBackend) InsertEntry(entry Entry) error
- func (m MockedBackend) Set() EntrySet
- type MockedEntry
- func (*MockedEntry) Descriptor() ([]byte, []int)
- func (m *MockedEntry) GetData() string
- func (m *MockedEntry) GetID() string
- func (m *MockedEntry) GetLastAdded() int64
- func (m *MockedEntry) GetLastDeleted() int64
- func (*MockedEntry) ProtoMessage()
- func (m *MockedEntry) Reset()
- func (m *MockedEntry) String() string
- type MockedEntryList
- func (e *MockedEntryList) Append(entry Entry)
- func (e *MockedEntryList) AtIndex(idx int) Entry
- func (*MockedEntryList) Descriptor() ([]byte, []int)
- func (m *MockedEntryList) GetMockedEntries() []*MockedEntry
- func (e *MockedEntryList) Length() int
- func (e *MockedEntryList) New() EntrySet
- func (*MockedEntryList) ProtoMessage()
- func (e *MockedEntryList) Range(f func(idx int, entry Entry))
- func (m *MockedEntryList) Reset()
- func (e *MockedEntryList) Set(idx int, entry Entry)
- func (m *MockedEntryList) String() string
- type Router
- type Store
- func (s *Store) ApplyDelta(set EntrySet) error
- func (s *Store) ComputeDelta(set EntrySet) EntrySet
- func (s *Store) Gossip() mesh.GossipData
- func (s *Store) OnGossip(msg []byte) (mesh.GossipData, error)
- func (s *Store) OnGossipBroadcast(src mesh.PeerName, msg []byte) (mesh.GossipData, error)
- func (s *Store) OnGossipUnicast(src mesh.PeerName, msg []byte) error
- func (s *Store) Upsert(entry Entry) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMockedEntryNotFound = errors.New("mocked entry not found")
Functions ¶
This section is empty.
Types ¶
type Dataset ¶
type Dataset struct {
// contains filtered or unexported fields
}
func (Dataset) Merge ¶
func (set Dataset) Merge(data mesh.GossipData) mesh.GossipData
type MockedBackend ¶
type MockedBackend map[string]*MockedEntry
MockedBackend implements Backend interface using a map. This implementation is _not_ thread-safe.
func (MockedBackend) DeleteEntry ¶
func (m MockedBackend) DeleteEntry(e Entry) error
func (MockedBackend) Dump ¶
func (m MockedBackend) Dump() EntrySet
func (MockedBackend) InsertEntries ¶
func (m MockedBackend) InsertEntries(e EntrySet) error
func (MockedBackend) InsertEntry ¶
func (m MockedBackend) InsertEntry(entry Entry) error
func (MockedBackend) Set ¶
func (m MockedBackend) Set() EntrySet
type MockedEntry ¶
type MockedEntry struct { ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"` LastAdded int64 `protobuf:"varint,2,opt,name=LastAdded" json:"LastAdded,omitempty"` LastDeleted int64 `protobuf:"varint,3,opt,name=LastDeleted" json:"LastDeleted,omitempty"` Data string `protobuf:"bytes,4,opt,name=Data" json:"Data,omitempty"` }
func (*MockedEntry) Descriptor ¶
func (*MockedEntry) Descriptor() ([]byte, []int)
func (*MockedEntry) GetData ¶
func (m *MockedEntry) GetData() string
func (*MockedEntry) GetID ¶
func (m *MockedEntry) GetID() string
func (*MockedEntry) GetLastAdded ¶
func (m *MockedEntry) GetLastAdded() int64
func (*MockedEntry) GetLastDeleted ¶
func (m *MockedEntry) GetLastDeleted() int64
func (*MockedEntry) ProtoMessage ¶
func (*MockedEntry) ProtoMessage()
func (*MockedEntry) Reset ¶
func (m *MockedEntry) Reset()
func (*MockedEntry) String ¶
func (m *MockedEntry) String() string
type MockedEntryList ¶
type MockedEntryList struct {
MockedEntries []*MockedEntry `protobuf:"bytes,1,rep,name=MockedEntries" json:"MockedEntries,omitempty"`
}
func (*MockedEntryList) Append ¶
func (e *MockedEntryList) Append(entry Entry)
func (*MockedEntryList) AtIndex ¶
func (e *MockedEntryList) AtIndex(idx int) Entry
func (*MockedEntryList) Descriptor ¶
func (*MockedEntryList) Descriptor() ([]byte, []int)
func (*MockedEntryList) GetMockedEntries ¶
func (m *MockedEntryList) GetMockedEntries() []*MockedEntry
func (*MockedEntryList) Length ¶
func (e *MockedEntryList) Length() int
func (*MockedEntryList) New ¶
func (e *MockedEntryList) New() EntrySet
func (*MockedEntryList) ProtoMessage ¶
func (*MockedEntryList) ProtoMessage()
func (*MockedEntryList) Range ¶
func (e *MockedEntryList) Range(f func(idx int, entry Entry))
func (*MockedEntryList) Reset ¶
func (m *MockedEntryList) Reset()
func (*MockedEntryList) Set ¶
func (e *MockedEntryList) Set(idx int, entry Entry)
func (*MockedEntryList) String ¶
func (m *MockedEntryList) String() string
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ApplyDelta ¶
func (*Store) ComputeDelta ¶
func (*Store) Gossip ¶
func (s *Store) Gossip() mesh.GossipData
func (*Store) OnGossipBroadcast ¶
func (*Store) OnGossipUnicast ¶
Click to show internal directories.
Click to hide internal directories.