Documentation ¶
Overview ¶
Package grpc provides a GRPC access to the underlying persistence layer for files metadata
Index ¶
- Variables
- type EventsSubscriber
- type MetaServer
- func (s *MetaServer) CreateNode(ctx context.Context, req *tree.CreateNodeRequest) (resp *tree.CreateNodeResponse, err error)
- func (s *MetaServer) DeleteNode(ctx context.Context, request *tree.DeleteNodeRequest) (result *tree.DeleteNodeResponse, err error)
- func (s *MetaServer) ListNodes(req *tree.ListNodesRequest, resp tree.NodeProvider_ListNodesServer) (err error)
- func (s *MetaServer) Name() string
- func (s *MetaServer) ReadNode(ctx context.Context, req *tree.ReadNodeRequest) (resp *tree.ReadNodeResponse, err error)
- func (s *MetaServer) ReadNodeStream(streamer tree.NodeProviderStreamer_ReadNodeStreamServer) error
- func (s *MetaServer) Search(request *tree.SearchRequest, result tree.Searcher_SearchServer) error
- func (s *MetaServer) Stop()
- func (s *MetaServer) Subscriber(parentContext context.Context) *EventsSubscriber
- func (s *MetaServer) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest) (resp *tree.UpdateNodeResponse, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ServiceName = common.ServiceGrpcNamespace_ + common.ServiceMeta
)
Functions ¶
This section is empty.
Types ¶
type EventsSubscriber ¶
type EventsSubscriber struct {
// contains filtered or unexported fields
}
EventsSubscriber definition
func (*EventsSubscriber) Handle ¶
func (e *EventsSubscriber) Handle(ctx context.Context, msg *tree.NodeChangeEvent) error
Handle the events received and send them to the subscriber
type MetaServer ¶
type MetaServer struct { tree.UnimplementedNodeProviderServer tree.UnimplementedNodeProviderStreamerServer tree.UnimplementedNodeReceiverServer tree.UnimplementedSearcherServer // contains filtered or unexported fields }
MetaServer definition
func NewMetaServer ¶
func NewMetaServer(ctx context.Context, dao meta.DAO) *MetaServer
func (*MetaServer) CreateNode ¶
func (s *MetaServer) CreateNode(ctx context.Context, req *tree.CreateNodeRequest) (resp *tree.CreateNodeResponse, err error)
CreateNode metadata
func (*MetaServer) DeleteNode ¶
func (s *MetaServer) DeleteNode(ctx context.Context, request *tree.DeleteNodeRequest) (result *tree.DeleteNodeResponse, err error)
DeleteNode metadata (Not implemented)
func (*MetaServer) ListNodes ¶
func (s *MetaServer) ListNodes(req *tree.ListNodesRequest, resp tree.NodeProvider_ListNodesServer) (err error)
ListNodes information from the meta server (Not implemented)
func (*MetaServer) Name ¶
func (s *MetaServer) Name() string
func (*MetaServer) ReadNode ¶
func (s *MetaServer) ReadNode(ctx context.Context, req *tree.ReadNodeRequest) (resp *tree.ReadNodeResponse, err error)
ReadNode information off the meta server
func (*MetaServer) ReadNodeStream ¶
func (s *MetaServer) ReadNodeStream(streamer tree.NodeProviderStreamer_ReadNodeStreamServer) error
ReadNodeStream implements ReadNode as a bidirectional stream
func (*MetaServer) Search ¶
func (s *MetaServer) Search(request *tree.SearchRequest, result tree.Searcher_SearchServer) error
Search a stream of nodes based on its metadata
func (*MetaServer) Stop ¶
func (s *MetaServer) Stop()
func (*MetaServer) Subscriber ¶
func (s *MetaServer) Subscriber(parentContext context.Context) *EventsSubscriber
Subscriber that will treat events for the meta server
func (*MetaServer) UpdateNode ¶
func (s *MetaServer) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest) (resp *tree.UpdateNodeResponse, err error)
UpdateNode metadata
Click to show internal directories.
Click to hide internal directories.