Documentation ¶
Overview ¶
Package grpcsync implements (in ALPHA VERSION) the gRPC transport client and server that satisfies the datasync API. See the definition of the service in ../syncbase/msg package). This implementation is special (comparing to dbsync or msgsync) 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 ¶
- type Adapter
- type DataMsgServiceServer
- func (s *DataMsgServiceServer) DataChanges(stream msg.DataMsgService_DataChangesServer) error
- func (s *DataMsgServiceServer) DataResyncs(ctx context.Context, req *msg.DataResyncRequests) (*msg.DataResyncReplies, error)
- func (s *DataMsgServiceServer) Ping(ctx context.Context, req *msg.PingRequest) (*msg.PingReply, error)
- type Deps
- type Plugin
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 GRPC transport adapter in front of Agent Plugins
func NewAdapter ¶
NewAdapter creates a new instance of Adapter.
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
type DataMsgServiceServer ¶
type DataMsgServiceServer struct {
// contains filtered or unexported fields
}
DataMsgServiceServer is //TODO
func NewDataMsgServiceServer ¶
func NewDataMsgServiceServer(adapter *Adapter) *DataMsgServiceServer
NewDataMsgServiceServer creates a new instance of DataMsgServiceServer
func (*DataMsgServiceServer) DataChanges ¶
func (s *DataMsgServiceServer) DataChanges(stream msg.DataMsgService_DataChangesServer) error
DataChanges propagates the events in the stream to go channels of registered plugins
func (*DataMsgServiceServer) DataResyncs ¶
func (s *DataMsgServiceServer) DataResyncs(ctx context.Context, req *msg.DataResyncRequests) ( *msg.DataResyncReplies, error)
DataResyncs propagates the events in the stream to go channels of registered plugins
func (*DataMsgServiceServer) Ping ¶
func (s *DataMsgServiceServer) Ping(ctx context.Context, req *msg.PingRequest) (*msg.PingReply, error)
Ping checks the connectivity / measure the minimal transport latency
type Plugin ¶
type Plugin struct { Deps Adapter datasync.KeyValProtoWatcher }
Plugin grpcsync implements Plugin interface therefore can be loaded with other plugins