Documentation ¶
Index ¶
- Variables
- type BucketProxy
- type BucketProxyFactory
- type BucketSyncHTTP
- type CloudBucketProxyFactory
- func (cloudBucketProxyFactory *CloudBucketProxyFactory) CreateBucketProxy(peerID string, bucketName string) (BucketProxy, error)
- func (cloudBucketProxyFactory *CloudBucketProxyFactory) IncomingBuckets(peerID string) map[string]bool
- func (cloudBucketProxyFactory *CloudBucketProxyFactory) OutgoingBuckets(peerID string) map[string]bool
- type CloudLocalBucketProxy
- func (bucketProxy *CloudLocalBucketProxy) Close()
- func (bucketProxy *CloudLocalBucketProxy) Forget(keys [][]byte) error
- func (bucketProxy *CloudLocalBucketProxy) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error)
- func (bucketProxy *CloudLocalBucketProxy) Merge(mergedKeys map[string]*SiblingSet) error
- func (bucketProxy *CloudLocalBucketProxy) MerkleTree() MerkleTreeProxy
- func (bucketProxy *CloudLocalBucketProxy) Name() string
- type CloudRemoteBucketProxy
- func (bucketProxy *CloudRemoteBucketProxy) Close()
- func (bucketProxy *CloudRemoteBucketProxy) Forget(keys [][]byte) error
- func (bucketProxy *CloudRemoteBucketProxy) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error)
- func (bucketProxy *CloudRemoteBucketProxy) Merge(mergedKeys map[string]*SiblingSet) error
- func (bucketProxy *CloudRemoteBucketProxy) MerkleTree() MerkleTreeProxy
- func (bucketProxy *CloudRemoteBucketProxy) Name() string
- type CloudResponderMerkleNodeIterator
- func (iter *CloudResponderMerkleNodeIterator) Error() error
- func (iter *CloudResponderMerkleNodeIterator) Key() []byte
- func (iter *CloudResponderMerkleNodeIterator) LocalVersion() uint64
- func (iter *CloudResponderMerkleNodeIterator) Next() bool
- func (iter *CloudResponderMerkleNodeIterator) Prefix() []byte
- func (iter *CloudResponderMerkleNodeIterator) Release()
- func (iter *CloudResponderMerkleNodeIterator) Value() *SiblingSet
- type CloudResponderMerkleTreeProxy
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) Depth() uint8
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) Error() error
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) LeftChild(nodeID uint32) uint32
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) Level(nodeID uint32) uint8
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) NodeHash(nodeID uint32) Hash
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) NodeLimit() uint32
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) RightChild(nodeID uint32) uint32
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) RootNode() uint32
- func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) TranslateNode(nodeID uint32, depth uint8) uint32
- type DirectMerkleTreeProxy
- func (directMerkleProxy *DirectMerkleTreeProxy) Depth() uint8
- func (directMerkleProxy *DirectMerkleTreeProxy) Error() error
- func (directMerkleProxy *DirectMerkleTreeProxy) LeftChild(nodeID uint32) uint32
- func (directMerkleProxy *DirectMerkleTreeProxy) Level(nodeID uint32) uint8
- func (directMerkleProxy *DirectMerkleTreeProxy) MerkleTree() *MerkleTree
- func (directMerkleProxy *DirectMerkleTreeProxy) NodeHash(nodeID uint32) Hash
- func (directMerkleProxy *DirectMerkleTreeProxy) NodeLimit() uint32
- func (directMerkleProxy *DirectMerkleTreeProxy) RightChild(nodeID uint32) uint32
- func (directMerkleProxy *DirectMerkleTreeProxy) RootNode() uint32
- func (directMerkleProxy *DirectMerkleTreeProxy) TranslateNode(nodeID uint32, depth uint8) uint32
- type MerkleTreeProxy
- type MultiSyncScheduler
- func (syncScheduler *MultiSyncScheduler) AddPeer(peerID string, buckets []string)
- func (syncScheduler *MultiSyncScheduler) Advance()
- func (syncScheduler *MultiSyncScheduler) Next() (string, string)
- func (syncScheduler *MultiSyncScheduler) RemovePeer(peerID string)
- func (syncScheduler *MultiSyncScheduler) Schedule(peerID string)
- type Peer
- type PeerHeap
- type PeriodicSyncScheduler
- func (syncScheduler *PeriodicSyncScheduler) AddPeer(peerID string, buckets []string)
- func (syncScheduler *PeriodicSyncScheduler) Advance()
- func (syncScheduler *PeriodicSyncScheduler) Next() (string, string)
- func (syncScheduler *PeriodicSyncScheduler) RemovePeer(peerID string)
- func (syncScheduler *PeriodicSyncScheduler) Schedule(peerID string)
- type RelayBucketProxy
- func (relayBucketProxy *RelayBucketProxy) Close()
- func (relayBucketProxy *RelayBucketProxy) Forget(keys [][]byte) error
- func (relayBucketProxy *RelayBucketProxy) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error)
- func (relayBucketProxy *RelayBucketProxy) Merge(mergedKeys map[string]*SiblingSet) error
- func (relayBucketProxy *RelayBucketProxy) MerkleTree() MerkleTreeProxy
- func (relayBucketProxy *RelayBucketProxy) Name() string
- type RelayBucketProxyFactory
- func (relayBucketProxyFactory *RelayBucketProxyFactory) CreateBucketProxy(peerID string, bucketName string) (BucketProxy, error)
- func (relayBucketProxyFactory *RelayBucketProxyFactory) IncomingBuckets(peerID string) map[string]bool
- func (relayBucketProxyFactory *RelayBucketProxyFactory) OutgoingBuckets(peerID string) map[string]bool
- type SyncScheduler
Constants ¶
This section is empty.
Variables ¶
View Source
var ENoLocalBucket = errors.New("No such bucket exists locally")
Functions ¶
This section is empty.
Types ¶
type BucketProxy ¶
type BucketProxyFactory ¶
type BucketProxyFactory interface { // Return a set of buckets for which updates can be // pushed from the given node to this node/cluster IncomingBuckets(peerID string) map[string]bool // Return a set of buckets for which updates can be // pushed from this node/cluster to the given node OutgoingBuckets(peerID string) map[string]bool // Create a bucket proxy to the bucket specified in the site // that the peer belongs to CreateBucketProxy(peerID string, bucket string) (BucketProxy, error) }
type BucketSyncHTTP ¶
type BucketSyncHTTP struct { PartitionPool PartitionPool ClusterConfigController ClusterConfigController }
func (*BucketSyncHTTP) Attach ¶
func (bucketSync *BucketSyncHTTP) Attach(router *mux.Router)
type CloudBucketProxyFactory ¶
type CloudBucketProxyFactory struct { // An intra-cluster client Client Client // The cluster controller for this node ClusterController *ClusterController // The partition pool for this node PartitionPool PartitionPool // The cluster io agent for this node ClusterIOAgent ClusterIOAgent }
func (*CloudBucketProxyFactory) CreateBucketProxy ¶
func (cloudBucketProxyFactory *CloudBucketProxyFactory) CreateBucketProxy(peerID string, bucketName string) (BucketProxy, error)
func (*CloudBucketProxyFactory) IncomingBuckets ¶
func (cloudBucketProxyFactory *CloudBucketProxyFactory) IncomingBuckets(peerID string) map[string]bool
func (*CloudBucketProxyFactory) OutgoingBuckets ¶
func (cloudBucketProxyFactory *CloudBucketProxyFactory) OutgoingBuckets(peerID string) map[string]bool
type CloudLocalBucketProxy ¶
type CloudLocalBucketProxy struct { Bucket Bucket SiteID string SitePool SitePool ClusterIOAgent ClusterIOAgent }
func (*CloudLocalBucketProxy) Close ¶
func (bucketProxy *CloudLocalBucketProxy) Close()
func (*CloudLocalBucketProxy) Forget ¶
func (bucketProxy *CloudLocalBucketProxy) Forget(keys [][]byte) error
func (*CloudLocalBucketProxy) GetSyncChildren ¶
func (bucketProxy *CloudLocalBucketProxy) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error)
func (*CloudLocalBucketProxy) Merge ¶
func (bucketProxy *CloudLocalBucketProxy) Merge(mergedKeys map[string]*SiblingSet) error
func (*CloudLocalBucketProxy) MerkleTree ¶
func (bucketProxy *CloudLocalBucketProxy) MerkleTree() MerkleTreeProxy
func (*CloudLocalBucketProxy) Name ¶
func (bucketProxy *CloudLocalBucketProxy) Name() string
type CloudRemoteBucketProxy ¶
type CloudRemoteBucketProxy struct { Client Client PeerAddress PeerAddress SiteID string BucketName string ClusterIOAgent ClusterIOAgent // contains filtered or unexported fields }
func (*CloudRemoteBucketProxy) Close ¶
func (bucketProxy *CloudRemoteBucketProxy) Close()
func (*CloudRemoteBucketProxy) Forget ¶
func (bucketProxy *CloudRemoteBucketProxy) Forget(keys [][]byte) error
func (*CloudRemoteBucketProxy) GetSyncChildren ¶
func (bucketProxy *CloudRemoteBucketProxy) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error)
func (*CloudRemoteBucketProxy) Merge ¶
func (bucketProxy *CloudRemoteBucketProxy) Merge(mergedKeys map[string]*SiblingSet) error
func (*CloudRemoteBucketProxy) MerkleTree ¶
func (bucketProxy *CloudRemoteBucketProxy) MerkleTree() MerkleTreeProxy
func (*CloudRemoteBucketProxy) Name ¶
func (bucketProxy *CloudRemoteBucketProxy) Name() string
type CloudResponderMerkleNodeIterator ¶
type CloudResponderMerkleNodeIterator struct { MerkleKeys rest.MerkleKeys CurrentIndex int }
func (*CloudResponderMerkleNodeIterator) Error ¶
func (iter *CloudResponderMerkleNodeIterator) Error() error
func (*CloudResponderMerkleNodeIterator) Key ¶
func (iter *CloudResponderMerkleNodeIterator) Key() []byte
func (*CloudResponderMerkleNodeIterator) LocalVersion ¶
func (iter *CloudResponderMerkleNodeIterator) LocalVersion() uint64
func (*CloudResponderMerkleNodeIterator) Next ¶
func (iter *CloudResponderMerkleNodeIterator) Next() bool
func (*CloudResponderMerkleNodeIterator) Prefix ¶
func (iter *CloudResponderMerkleNodeIterator) Prefix() []byte
func (*CloudResponderMerkleNodeIterator) Release ¶
func (iter *CloudResponderMerkleNodeIterator) Release()
func (*CloudResponderMerkleNodeIterator) Value ¶
func (iter *CloudResponderMerkleNodeIterator) Value() *SiblingSet
type CloudResponderMerkleTreeProxy ¶
type CloudResponderMerkleTreeProxy struct {
// contains filtered or unexported fields
}
func (*CloudResponderMerkleTreeProxy) Depth ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) Depth() uint8
func (*CloudResponderMerkleTreeProxy) Error ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) Error() error
func (*CloudResponderMerkleTreeProxy) LeftChild ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) LeftChild(nodeID uint32) uint32
func (*CloudResponderMerkleTreeProxy) Level ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) Level(nodeID uint32) uint8
func (*CloudResponderMerkleTreeProxy) NodeHash ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) NodeHash(nodeID uint32) Hash
func (*CloudResponderMerkleTreeProxy) NodeLimit ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) NodeLimit() uint32
func (*CloudResponderMerkleTreeProxy) RightChild ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) RightChild(nodeID uint32) uint32
func (*CloudResponderMerkleTreeProxy) RootNode ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) RootNode() uint32
func (*CloudResponderMerkleTreeProxy) TranslateNode ¶
func (cloudResponderMerkleProxy *CloudResponderMerkleTreeProxy) TranslateNode(nodeID uint32, depth uint8) uint32
type DirectMerkleTreeProxy ¶
type DirectMerkleTreeProxy struct {
// contains filtered or unexported fields
}
func (*DirectMerkleTreeProxy) Depth ¶
func (directMerkleProxy *DirectMerkleTreeProxy) Depth() uint8
func (*DirectMerkleTreeProxy) Error ¶
func (directMerkleProxy *DirectMerkleTreeProxy) Error() error
func (*DirectMerkleTreeProxy) LeftChild ¶
func (directMerkleProxy *DirectMerkleTreeProxy) LeftChild(nodeID uint32) uint32
func (*DirectMerkleTreeProxy) Level ¶
func (directMerkleProxy *DirectMerkleTreeProxy) Level(nodeID uint32) uint8
func (*DirectMerkleTreeProxy) MerkleTree ¶
func (directMerkleProxy *DirectMerkleTreeProxy) MerkleTree() *MerkleTree
func (*DirectMerkleTreeProxy) NodeHash ¶
func (directMerkleProxy *DirectMerkleTreeProxy) NodeHash(nodeID uint32) Hash
func (*DirectMerkleTreeProxy) NodeLimit ¶
func (directMerkleProxy *DirectMerkleTreeProxy) NodeLimit() uint32
func (*DirectMerkleTreeProxy) RightChild ¶
func (directMerkleProxy *DirectMerkleTreeProxy) RightChild(nodeID uint32) uint32
func (*DirectMerkleTreeProxy) RootNode ¶
func (directMerkleProxy *DirectMerkleTreeProxy) RootNode() uint32
func (*DirectMerkleTreeProxy) TranslateNode ¶
func (directMerkleProxy *DirectMerkleTreeProxy) TranslateNode(nodeID uint32, depth uint8) uint32
type MerkleTreeProxy ¶
type MultiSyncScheduler ¶
type MultiSyncScheduler struct {
// contains filtered or unexported fields
}
Optimized for cloud servers that need to coordinate sync sessions with hundreds or thousands of relays at once. Tries to ensure that for any particular peer, sync sessions with that peer are scheduled periodically attempting to minimize jitter between the scheduled time and the actual time.
func NewMultiSyncScheduler ¶
func NewMultiSyncScheduler(syncPeriod time.Duration) *MultiSyncScheduler
func (*MultiSyncScheduler) AddPeer ¶
func (syncScheduler *MultiSyncScheduler) AddPeer(peerID string, buckets []string)
func (*MultiSyncScheduler) Advance ¶
func (syncScheduler *MultiSyncScheduler) Advance()
func (*MultiSyncScheduler) Next ¶
func (syncScheduler *MultiSyncScheduler) Next() (string, string)
func (*MultiSyncScheduler) RemovePeer ¶
func (syncScheduler *MultiSyncScheduler) RemovePeer(peerID string)
func (*MultiSyncScheduler) Schedule ¶
func (syncScheduler *MultiSyncScheduler) Schedule(peerID string)
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
func (*Peer) NextBucket ¶
type PeriodicSyncScheduler ¶
type PeriodicSyncScheduler struct {
// contains filtered or unexported fields
}
Sync queue optimized for relays that provides a new sync partner at a fixed rate
func NewPeriodicSyncScheduler ¶
func NewPeriodicSyncScheduler(syncPeriod time.Duration) *PeriodicSyncScheduler
func (*PeriodicSyncScheduler) AddPeer ¶
func (syncScheduler *PeriodicSyncScheduler) AddPeer(peerID string, buckets []string)
func (*PeriodicSyncScheduler) Advance ¶
func (syncScheduler *PeriodicSyncScheduler) Advance()
func (*PeriodicSyncScheduler) Next ¶
func (syncScheduler *PeriodicSyncScheduler) Next() (string, string)
func (*PeriodicSyncScheduler) RemovePeer ¶
func (syncScheduler *PeriodicSyncScheduler) RemovePeer(peerID string)
func (*PeriodicSyncScheduler) Schedule ¶
func (syncScheduler *PeriodicSyncScheduler) Schedule(peerID string)
type RelayBucketProxy ¶
type RelayBucketProxy struct { Bucket Bucket SiteID string SitePool SitePool }
func (*RelayBucketProxy) Close ¶
func (relayBucketProxy *RelayBucketProxy) Close()
func (*RelayBucketProxy) Forget ¶
func (relayBucketProxy *RelayBucketProxy) Forget(keys [][]byte) error
func (*RelayBucketProxy) GetSyncChildren ¶
func (relayBucketProxy *RelayBucketProxy) GetSyncChildren(nodeID uint32) (SiblingSetIterator, error)
func (*RelayBucketProxy) Merge ¶
func (relayBucketProxy *RelayBucketProxy) Merge(mergedKeys map[string]*SiblingSet) error
func (*RelayBucketProxy) MerkleTree ¶
func (relayBucketProxy *RelayBucketProxy) MerkleTree() MerkleTreeProxy
func (*RelayBucketProxy) Name ¶
func (relayBucketProxy *RelayBucketProxy) Name() string
type RelayBucketProxyFactory ¶
type RelayBucketProxyFactory struct {
// The site pool for this node
SitePool SitePool
}
func (*RelayBucketProxyFactory) CreateBucketProxy ¶
func (relayBucketProxyFactory *RelayBucketProxyFactory) CreateBucketProxy(peerID string, bucketName string) (BucketProxy, error)
func (*RelayBucketProxyFactory) IncomingBuckets ¶
func (relayBucketProxyFactory *RelayBucketProxyFactory) IncomingBuckets(peerID string) map[string]bool
func (*RelayBucketProxyFactory) OutgoingBuckets ¶
func (relayBucketProxyFactory *RelayBucketProxyFactory) OutgoingBuckets(peerID string) map[string]bool
Click to show internal directories.
Click to hide internal directories.