Documentation ¶
Overview ¶
Package grpc provides a GRPC service for aggregating all indexes from all datasources
Index ¶
- type DataSource
- type EventSubscriber
- type StreamConverter
- type TreeServer
- func (s *TreeServer) CreateNode(ctx context.Context, req *tree.CreateNodeRequest, ...) error
- func (s *TreeServer) DeleteNode(ctx context.Context, req *tree.DeleteNodeRequest, ...) error
- func (s *TreeServer) ListNodes(ctx context.Context, req *tree.ListNodesRequest, ...) error
- func (s *TreeServer) ListNodesWithLimit(ctx context.Context, req *tree.ListNodesRequest, ...) error
- func (s *TreeServer) PublishChange(change *tree.NodeChangeEvent)
- func (s *TreeServer) ReadNode(ctx context.Context, req *tree.ReadNodeRequest, resp *tree.ReadNodeResponse) error
- func (s *TreeServer) ReadNodeStream(ctx context.Context, streamer tree.NodeProviderStreamer_ReadNodeStreamStream) error
- func (s *TreeServer) Search(ctx context.Context, request *tree.SearchRequest, ...) error
- func (s *TreeServer) StreamChanges(ctx context.Context, req *tree.StreamChangesRequest, ...) error
- func (s *TreeServer) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource struct { Name string // contains filtered or unexported fields }
type EventSubscriber ¶
type EventSubscriber struct { TreeServer *TreeServer EventClient client.Client // contains filtered or unexported fields }
func NewEventSubscriber ¶
func NewEventSubscriber(t *TreeServer, c client.Client) *EventSubscriber
func (*EventSubscriber) Handle ¶
func (s *EventSubscriber) Handle(ctx context.Context, msg *tree.NodeChangeEvent) error
Handle incoming INDEX events and resend them as TREE events
type StreamConverter ¶ added in v1.5.0
type StreamConverter struct {
// contains filtered or unexported fields
}
StreamConvert wraps a Searcher_SearchStream into a NodesProvider_ListNodesStream
func (*StreamConverter) Close ¶ added in v1.5.0
func (sc *StreamConverter) Close() error
func (*StreamConverter) RecvMsg ¶ added in v1.5.0
func (sc *StreamConverter) RecvMsg(i interface{}) error
func (*StreamConverter) Send ¶ added in v1.5.0
func (sc *StreamConverter) Send(response *tree.ListNodesResponse) error
func (*StreamConverter) SendMsg ¶ added in v1.5.0
func (sc *StreamConverter) SendMsg(i interface{}) error
type TreeServer ¶
type TreeServer struct { DataSources map[string]DataSource ConfigsMutex *sync.Mutex // contains filtered or unexported fields }
func (*TreeServer) CreateNode ¶
func (s *TreeServer) CreateNode(ctx context.Context, req *tree.CreateNodeRequest, resp *tree.CreateNodeResponse) error
CreateNode implementation for the TreeServer
func (*TreeServer) DeleteNode ¶
func (s *TreeServer) DeleteNode(ctx context.Context, req *tree.DeleteNodeRequest, resp *tree.DeleteNodeResponse) error
DeleteNode implementation for the TreeServer
func (*TreeServer) ListNodes ¶
func (s *TreeServer) ListNodes(ctx context.Context, req *tree.ListNodesRequest, resp tree.NodeProvider_ListNodesStream) error
func (*TreeServer) ListNodesWithLimit ¶
func (s *TreeServer) ListNodesWithLimit(ctx context.Context, req *tree.ListNodesRequest, resp tree.NodeProvider_ListNodesStream, cursorIndex *int64, numberSent *int64) error
ListNodesWithLimit implementation for the TreeServer
func (*TreeServer) PublishChange ¶ added in v1.6.2
func (s *TreeServer) PublishChange(change *tree.NodeChangeEvent)
func (*TreeServer) ReadNode ¶
func (s *TreeServer) ReadNode(ctx context.Context, req *tree.ReadNodeRequest, resp *tree.ReadNodeResponse) error
ReadNode implementation for the TreeServer
func (*TreeServer) ReadNodeStream ¶
func (s *TreeServer) ReadNodeStream(ctx context.Context, streamer tree.NodeProviderStreamer_ReadNodeStreamStream) error
ReadNodeStream Implement stream for readNode method
func (*TreeServer) Search ¶ added in v1.5.0
func (s *TreeServer) Search(ctx context.Context, request *tree.SearchRequest, stream tree.Searcher_SearchStream) error
Search implements the SearchServer handler method. It will transform a tree.SearchRequest into an underlying ListNode query
func (*TreeServer) StreamChanges ¶ added in v1.6.2
func (s *TreeServer) StreamChanges(ctx context.Context, req *tree.StreamChangesRequest, streamer tree.NodeChangesStreamer_StreamChangesStream) error
func (*TreeServer) UpdateNode ¶
func (s *TreeServer) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest, resp *tree.UpdateNodeResponse) error
UpdateNode implementation for the TreeServer