Documentation
¶
Index ¶
Constants ¶
View Source
const ( /*TrackByDefault forces all files to be exported by default */ TrackByDefault = iota /*QuasiRealTime would sent changes as soon as they happen (actual time depends on OS); updates would be checked every 10 seconds or less when the underlying broker allows it. Typically used for data streaming */ QuasiRealTime )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface {
Close()
/*GetState returns the current differences between the federation and the local files */
GetState(time time.Time) State
/* Resolve either extract or ignore some pending changes */
Resolve(extracts []string, ignores []string) error
/*Mount adds a folder to be replicated to the federation */
Mount(folder string, options ...MountOption) error
/*SetTracked defines whether the file should be exported or not to the federation in case of changes */
SetTracked(file string, tracked bool) error
IsTracked(file string) bool
GetTransport() *broker.Broker
/*Invite creates an invite for the federation node */
Invite(key string, exchanges []string, removeSecrets bool) (string, error)
Sync() bool
Rewind(t time.Time)
Join(key string, token string) (Connection, error)
AddExchange(id string, v interface{}) error
}
func MustOpen ¶
func MustOpen(folder string, options ...Option) Connection
MustOpen ... is like Open but panic in case of error
type MountOption ¶
type MountOption int
type Update2 ¶
type Update2 struct {
State UpdateState `json:"state"`
ModTime time.Time `json:"modTime"`
Delete bool `json:"delete"`
// contains filtered or unexported fields
}
type UpdateState ¶
type UpdateState string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.