restsync

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package restsync implements (in ALPHA VERSION) the datasync API for the HTTP/REST transport. This implementation is special (compared to dbsync or bussync) because it does not use any intermediate persistence between the client and the server. Therefore, the client does remote calls to each individual server/agent instance (and needs to know its IP address & port).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter is a REST transport adapter in front of Agent Plugins

func NewAdapter

func NewAdapter(registerHTTPHandler registerHTTPHandler, localtransp *syncbase.Registry) *Adapter

NewAdapter is a constructor

func (*Adapter) RegisterTestHandler

func (adapter *Adapter) RegisterTestHandler()

RegisterTestHandler is used for runtime testing:

> curl -X GET http://localhost:<port>/log/list

func (*Adapter) Watch

func (adapter *Adapter) Watch(resyncName string, changeChan chan datasync.ChangeEvent,
	resyncChan chan datasync.ResyncEvent, keyPrefixes ...string) (datasync.WatchRegistration, error)

Watch registers HTTP handlers - basically bridges them with local dbadapter

Jump to

Keyboard shortcuts

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