grpc

package
v4.0.5-alpha2 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Overview

Package grpc is a pydio service running synchronization between objects and index.

Index

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

Handler structure

func NewHandler

func NewHandler(ctx context.Context, handlerName, datasource string) (*Handler, error)

func (*Handler) BroadcastCloseSession

func (s *Handler) BroadcastCloseSession(sessionUuid string)

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

CreateNode Forwards to Index

func (*Handler) DeleteNode

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

GetDataSourceConfig implements the S3Endpoint Interface by using the real object configs + the local datasource configs for bucket and base folder.

func (*Handler) Init added in v4.0.1

func (s *Handler) Init() error

func (*Handler) ListNodes

ListNodes Forward to index

func (*Handler) Name

func (s *Handler) Name() string

func (*Handler) NotifyError

func (s *Handler) NotifyError(errorPath string)

func (*Handler) PostNodeChanges added in v4.0.1

PostNodeChanges receives NodeChangesEvents, to be used with FallbackWatcher

func (*Handler) ReadNode

ReadNode Forwards to Index

func (*Handler) Start

func (s *Handler) Start()

func (*Handler) StartConfigsOnly

func (s *Handler) StartConfigsOnly()

func (*Handler) Stop

func (s *Handler) Stop()

func (*Handler) StopConfigsOnly

func (s *Handler) StopConfigsOnly()

func (*Handler) TriggerResync

TriggerResync sets 2 servers in sync

func (*Handler) UpdateNode

UpdateNode Forwards to S3

Jump to

Keyboard shortcuts

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