sync

package
v0.0.0-...-30e45d9 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const RevisionCurrent = -1

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Action   string
	Key      string
	Data     map[string]interface{}
	Revision int64
}

Event is a struct for Watch response

type Node

type Node struct {
	Key      string
	Value    string
	Revision int64
	Children []*Node
}

Node is a struct for Fetch response

type Sync

type Sync interface {
	HasLock(path string) bool
	Lock(path string, block bool) error
	Unlock(path string) error
	Fetch(path string) (*Node, error)
	Update(path, json string) error
	Delete(path string) error
	Watch(path string, responseChan chan *Event, stopChan chan bool, revision int64) error
	Close()
}

Sync is a interface for sync servers

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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