Documentation ¶
Index ¶
- Variables
- func AddSiloEventNotification(s Provider, state EventType, callback EventCallback) bool
- func Equals(sp1 Provider, sp2 Provider, blockSize int) (bool, error)
- func MapOverBlocks(offset int64, length int32, blockSize int, f func(b int, complete bool))
- type BlockInfo
- type BlockOrder
- type EventCallback
- type EventData
- type EventReturnData
- type EventType
- type ExposedStorage
- type LockableProvider
- type Provider
- type ProviderWithEvents
- type ProviderWithEventsIfc
- type SyncStartConfig
- type TrackingProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var BlockInfoFinish = &BlockInfo{Block: -1}
View Source
var BlockTypeAny = -1
View Source
var BlockTypeDirty = 1
View Source
var BlockTypePriority = 2
View Source
var BlockTypeStandard = 0
Functions ¶
func AddSiloEventNotification ¶ added in v0.0.10
func AddSiloEventNotification(s Provider, state EventType, callback EventCallback) bool
Try to add an event notification on a StorageProvider
Types ¶
type BlockOrder ¶
type EventCallback ¶ added in v0.0.10
type EventCallback func(event EventType, data EventData) EventReturnData
type EventReturnData ¶ added in v0.0.10
type EventReturnData interface{}
func SendSiloEvent ¶ added in v0.0.10
func SendSiloEvent(s Provider, eventType EventType, eventData EventData) []EventReturnData
Try to send an event for a given StorageProvider
type EventType ¶ added in v0.0.10
type EventType string
*
- A StorageProvider can simply embed StorageProviderWithEvents to support events *
type ExposedStorage ¶
type LockableProvider ¶ added in v0.1.0
type LockableProvider interface { Provider Lock() Unlock() }
type ProviderWithEvents ¶ added in v0.1.0
type ProviderWithEvents struct {
// contains filtered or unexported fields
}
func (*ProviderWithEvents) AddSiloEventNotification ¶ added in v0.1.0
func (spl *ProviderWithEvents) AddSiloEventNotification(eventType EventType, callback EventCallback)
Add a new callback for the given state.
func (*ProviderWithEvents) SendSiloEvent ¶ added in v0.1.0
func (spl *ProviderWithEvents) SendSiloEvent(eventType EventType, eventData EventData) []EventReturnData
Send an event, and notify any callbacks
type ProviderWithEventsIfc ¶ added in v0.1.0
type ProviderWithEventsIfc interface { Provider SendSiloEvent(EventType, EventData) []EventReturnData AddSiloEventNotification(EventType, EventCallback) }
type SyncStartConfig ¶ added in v0.1.2
type SyncStartConfig struct { AlternateSources []packets.AlternateSource Destination Provider }
type TrackingProvider ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.