Documentation
¶
Index ¶
- type SyncModel
- func (s *SyncModel) ApplyUpdates(update *sb.Update) bool
- func (s *SyncModel) CreateReadStream(opts ...duplex.Option) *duplex.Duplex
- func (s *SyncModel) CreateSinkStream(opts ...duplex.Option) *duplex.Duplex
- func (s *SyncModel) CreateSourceStream(opts ...duplex.Option) *duplex.Duplex
- func (s *SyncModel) CreateStream(opts ...duplex.Option) *duplex.Duplex
- func (s *SyncModel) CreateWriteStream(opts ...duplex.Option) *duplex.Duplex
- func (s *SyncModel) Get(k string, withClock bool) interface{}
- func (s *SyncModel) History(peerSources sb.Sources, accept *sb.ModelAccept) []*sb.Update
- func (s *SyncModel) IsAccepted(peerAccept *sb.ModelAccept, update *sb.Update) bool
- func (s *SyncModel) Keys() []string
- func (s *SyncModel) Set(k string, v interface{}) *SyncModel
- type ValueModel
- type ValueModelFrom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncModel ¶
type SyncModel struct {
*sb.Scuttlebutt
// contains filtered or unexported fields
}
MemoryModel 的操作不考虑“同步” 同步由 MemoryModel 间 Stream 负责 即业务和 IO 分离
func NewSyncModel ¶
func (*SyncModel) CreateReadStream ¶ added in v1.0.1
func (*SyncModel) CreateSinkStream ¶
func (*SyncModel) CreateSourceStream ¶
func (*SyncModel) CreateStream ¶
func (*SyncModel) CreateWriteStream ¶ added in v1.0.1
func (*SyncModel) IsAccepted ¶ added in v1.0.1
type ValueModel ¶
type ValueModel struct {
K string
V interface{}
}
type ValueModelFrom ¶
type ValueModelFrom struct {
*ValueModel
From sb.SourceId
}
Click to show internal directories.
Click to hide internal directories.