sync

package
v0.0.0-...-428fb08 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ops

type Ops struct {
	// contains filtered or unexported fields
}

Ops - Sync ops.

func (*Ops) Create

func (ops *Ops) Create(last string, path string) (hash string, err error)

Create - Create event operation.

func (*Ops) Handle

func (ops *Ops) Handle(last string, event fsnotify.Event) (hash string, err error)

Handle - Handles file system notification.

func (*Ops) Remove

func (ops *Ops) Remove(last string, path string) (hash string, err error)

Remove - Remove event operation.

func (*Ops) Rename

func (ops *Ops) Rename(last string, path string) (hash string, err error)

Rename - Rename event operation.

func (*Ops) Write

func (ops *Ops) Write(last string, path string) (hash string, err error)

Write - Write event operation.

type Synchronizer

type Synchronizer struct {
	// contains filtered or unexported fields
}

Synchronizer - IPFS directory synchronizer.

func Watch

func Watch(path string, opts shell.AddOptions) (sync *Synchronizer, err error)

Watch - Constructs new IPFS synchronizer for a directory.

func (*Synchronizer) Close

func (sync *Synchronizer) Close() (err error)

Close - Closes synchronizer.

func (*Synchronizer) Events

func (sync *Synchronizer) Events() <-chan string

Events - Sends new hashes.

func (*Synchronizer) Hash

func (sync *Synchronizer) Hash() string

Hash - Current hash.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL