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 ¶
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
Click to show internal directories.
Click to hide internal directories.