index

package
v2.0.0-rc3+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package index provides a GRPC client for storing information into any tree.NodeProviderClient/tree.NodeReceiverClient service. Typically the index service associated to each datasource.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(dsName string, reader tree.NodeProviderClient, writer tree.NodeReceiverClient, sessionClient tree.SessionIndexerClient) *Client

func (*Client) ComputeChecksum

func (i *Client) ComputeChecksum(node *tree.Node) error

func (*Client) CreateNode

func (i *Client) CreateNode(ctx context.Context, node *tree.Node, updateIfExists bool) (err error)

func (*Client) DeleteNode

func (i *Client) DeleteNode(ctx context.Context, path string) (err error)

func (*Client) FinishSession

func (i *Client) FinishSession(ctx context.Context, sessionUuid string) error

func (*Client) FlushSession

func (i *Client) FlushSession(ctx context.Context, sessionUuid string) error

func (*Client) GetCachedBranches

func (i *Client) GetCachedBranches(ctx context.Context, roots ...string) model.PathSyncSource

GetCachedBranches implements CachedBranchProvider by loading branches in a MemDB

func (*Client) GetEndpointInfo

func (i *Client) GetEndpointInfo() model.EndpointInfo

func (*Client) LoadNode

func (i *Client) LoadNode(ctx context.Context, path string, extendedStats ...bool) (node *tree.Node, err error)

func (*Client) LoadNodeByUuid

func (i *Client) LoadNodeByUuid(ctx context.Context, uuid string) (node *tree.Node, err error)

LoadNodeByUuid makes this endpoint an UuidProvider

func (*Client) MoveNode

func (i *Client) MoveNode(ctx context.Context, oldPath string, newPath string) (err error)

func (*Client) StartSession

func (i *Client) StartSession(ctx context.Context, rootNode *tree.Node, silent bool) (*tree.IndexationSession, error)

func (*Client) Walk

func (i *Client) Walk(walknFc model.WalkNodesFunc, root string, recursive bool) (err error)

func (*Client) Watch

func (i *Client) Watch(recursivePath string) (*model.WatchObject, error)

type Streamer

type Streamer struct {
	// contains filtered or unexported fields
}

func NewStreamer

func NewStreamer(serviceName string) *Streamer

func (*Streamer) CreateNode

func (i *Streamer) CreateNode(ctx context.Context, request *tree.CreateNodeRequest) (response *tree.CreateNodeResponse, err error)

func (*Streamer) DeleteNode

func (i *Streamer) DeleteNode(ctx context.Context, request *tree.DeleteNodeRequest) (response *tree.DeleteNodeResponse, err error)

func (*Streamer) ReadNode

func (i *Streamer) ReadNode(ctx context.Context, request *tree.ReadNodeRequest) (response *tree.ReadNodeResponse, err error)

func (*Streamer) StartCreator

func (i *Streamer) StartCreator(ctx context.Context) error

func (*Streamer) StartDeleter

func (i *Streamer) StartDeleter(ctx context.Context) error

func (*Streamer) StartReader

func (i *Streamer) StartReader(ctx context.Context) error

func (*Streamer) StartUpdater

func (i *Streamer) StartUpdater(ctx context.Context) error

func (*Streamer) Stop

func (i *Streamer) Stop()

func (*Streamer) UpdateNode

func (i *Streamer) UpdateNode(ctx context.Context, request *tree.UpdateNodeRequest) (response *tree.UpdateNodeResponse, err error)

Jump to

Keyboard shortcuts

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