Documentation ¶
Overview ¶
Package grpc is a pydio service running synchronization between objects and index.
Index ¶
- func WithStorage(source string) service.ServiceOption
- type FlatSnapshot
- type Handler
- func (s *Handler) BroadcastCloseSession(sessionUuid string)
- func (s *Handler) CleanResourcesBeforeDelete(ctx context.Context, request *object.CleanResourcesRequest) (*object.CleanResourcesResponse, error)
- func (s *Handler) CreateNode(ctx context.Context, req *tree.CreateNodeRequest) (*tree.CreateNodeResponse, error)
- func (s *Handler) DeleteNode(ctx context.Context, req *tree.DeleteNodeRequest) (*tree.DeleteNodeResponse, error)
- func (s *Handler) FlatScanEmpty(ctx context.Context, syncStatus chan model.Status, syncDone chan interface{}) (model.Stater, error)
- func (s *Handler) FlatSyncSnapshot(ctx context.Context, dsObject *object.DataSource, mode string, snapName string, ...) (model.Stater, error)
- func (s *Handler) GetDataSourceConfig(ctx context.Context, request *object.GetDataSourceConfigRequest) (*object.GetDataSourceConfigResponse, error)
- func (s *Handler) Init() error
- func (s *Handler) ListNodes(req *tree.ListNodesRequest, resp tree.NodeProvider_ListNodesServer) error
- func (s *Handler) Name() string
- func (s *Handler) NotifyError(errorPath string)
- func (s *Handler) PostNodeChanges(server tree.NodeChangesReceiverStreamer_PostNodeChangesServer) error
- func (s *Handler) ReadNode(ctx context.Context, req *tree.ReadNodeRequest) (*tree.ReadNodeResponse, error)
- func (s *Handler) Start()
- func (s *Handler) StartConfigsOnly()
- func (s *Handler) Stop()
- func (s *Handler) StopConfigsOnly()
- func (s *Handler) TriggerResync(c context.Context, req *protosync.ResyncRequest) (*protosync.ResyncResponse, error)
- func (s *Handler) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest) (*tree.UpdateNodeResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithStorage ¶
func WithStorage(source string) service.ServiceOption
Types ¶
type FlatSnapshot ¶
type FlatSnapshot struct { *snapshot.BoltSnapshot // contains filtered or unexported fields }
FlatSnapshot is a composed sync endpoint combining a BoltDB and S3 client.
func (*FlatSnapshot) Close ¶
func (f *FlatSnapshot) Close(delete ...bool) error
func (*FlatSnapshot) GetEndpointInfo ¶
func (f *FlatSnapshot) GetEndpointInfo() model.EndpointInfo
func (*FlatSnapshot) Walk ¶
func (f *FlatSnapshot) Walk(ctx context.Context, walknFc model.WalkNodesFunc, root string, recursive bool) (err error)
type Handler ¶
type Handler struct { SyncConfig *object.DataSource ObjectConfig *object.MinioConfig tree.UnimplementedNodeProviderServer tree.UnimplementedNodeReceiverServer tree.UnimplementedNodeChangesReceiverStreamerServer protosync.UnimplementedSyncEndpointServer object.UnimplementedDataSourceEndpointServer object.UnimplementedResourceCleanerEndpointServer // contains filtered or unexported fields }
Handler structure
func NewHandler ¶
func (*Handler) BroadcastCloseSession ¶
BroadcastCloseSession forwards session id to underlying sync task
func (*Handler) CleanResourcesBeforeDelete ¶
func (s *Handler) CleanResourcesBeforeDelete(ctx context.Context, request *object.CleanResourcesRequest) (*object.CleanResourcesResponse, error)
CleanResourcesBeforeDelete gracefully stops the sync task and remove the associated resync job
func (*Handler) CreateNode ¶
func (s *Handler) CreateNode(ctx context.Context, req *tree.CreateNodeRequest) (*tree.CreateNodeResponse, error)
CreateNode Forwards to Index
func (*Handler) DeleteNode ¶
func (s *Handler) DeleteNode(ctx context.Context, req *tree.DeleteNodeRequest) (*tree.DeleteNodeResponse, error)
DeleteNode Forwards to S3
func (*Handler) FlatScanEmpty ¶
func (s *Handler) FlatScanEmpty(ctx context.Context, syncStatus chan model.Status, syncDone chan interface{}) (model.Stater, error)
FlatScanEmpty uses s3 client to feed index from bucket (basic mono-directional sync)
func (*Handler) FlatSyncSnapshot ¶
func (s *Handler) FlatSyncSnapshot(ctx context.Context, dsObject *object.DataSource, mode string, snapName string, syncStatus chan model.Status, syncDone chan interface{}) (model.Stater, error)
FlatSyncSnapshot can read or write a snapshot of the index inside the storage
func (*Handler) GetDataSourceConfig ¶
func (s *Handler) GetDataSourceConfig(ctx context.Context, request *object.GetDataSourceConfigRequest) (*object.GetDataSourceConfigResponse, error)
GetDataSourceConfig implements the S3Endpoint Interface by using the real object configs + the local datasource configs for bucket and base folder.
func (*Handler) ListNodes ¶
func (s *Handler) ListNodes(req *tree.ListNodesRequest, resp tree.NodeProvider_ListNodesServer) error
ListNodes Forward to index
func (*Handler) NotifyError ¶
func (*Handler) PostNodeChanges ¶ added in v4.0.1
func (s *Handler) PostNodeChanges(server tree.NodeChangesReceiverStreamer_PostNodeChangesServer) error
PostNodeChanges receives NodeChangesEvents, to be used with FallbackWatcher
func (*Handler) ReadNode ¶
func (s *Handler) ReadNode(ctx context.Context, req *tree.ReadNodeRequest) (*tree.ReadNodeResponse, error)
ReadNode Forwards to Index
func (*Handler) StartConfigsOnly ¶
func (s *Handler) StartConfigsOnly()
func (*Handler) StopConfigsOnly ¶
func (s *Handler) StopConfigsOnly()
func (*Handler) TriggerResync ¶
func (s *Handler) TriggerResync(c context.Context, req *protosync.ResyncRequest) (*protosync.ResyncResponse, error)
TriggerResync sets 2 servers in sync
func (*Handler) UpdateNode ¶
func (s *Handler) UpdateNode(ctx context.Context, req *tree.UpdateNodeRequest) (*tree.UpdateNodeResponse, error)
UpdateNode Forwards to S3