grpc

package
v2.1.0-rc0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Overview

Package grpc provides a GRPC service for aggregating all indexes from all datasources

Index

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

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 (*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

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

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

func (*TreeServer) UpdateNode

func (s *TreeServer) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest, resp *tree.UpdateNodeResponse) error

UpdateNode implementation for the TreeServer

Jump to

Keyboard shortcuts

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