grpc

package
v5.0.0-alpha00 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

func (*Handler) CleanResourcesBeforeDelete

func (h *Handler) CleanResourcesBeforeDelete(ctx context.Context, _ *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) GetDataSourceConfig

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

func (*Handler) ListNodes

ListNodes Forward to index

func (*Handler) PostNodeChanges

PostNodeChanges receives NodeChangesEvents, to be used with FallbackWatcher

func (*Handler) ReadNode

ReadNode Forwards to Index

func (*Handler) Ready

Ready implements a custom Readyness healthcheck API

func (*Handler) TriggerResync

func (h *Handler) TriggerResync(c context.Context, req *sync.ResyncRequest) (*sync.ResyncResponse, error)

TriggerResync sets 2 servers in sync

func (*Handler) UpdateNode

UpdateNode Forwards to S3

type Syncer

type Syncer struct {
	GlobalCtx context.Context
	DsName    string

	IndexClientRead    tree.NodeProviderClient
	IndexClientWrite   tree.NodeReceiverClient
	IndexClientClean   protosync.SyncEndpointClient
	IndexClientSession tree.SessionIndexerClient
	S3client           model.Endpoint

	SyncTask     *task.Sync
	StMux        *sync2.Mutex
	SyncConfig   *object.DataSource
	ObjectConfig *object.MinioConfig

	ChangeEventsFallback chan *tree.NodeChangeEvent
	// contains filtered or unexported fields
}

Syncer structure

func NewSyncer

func NewSyncer(ctx context.Context, datasource string) (*Syncer, error)

func (*Syncer) BroadcastCloseSession

func (s *Syncer) BroadcastCloseSession(sessionUuid string)

BroadcastCloseSession forwards session id to underlying sync task

func (*Syncer) Config

func (s *Syncer) Config(ctx context.Context) (*object.DataSource, error)

func (*Syncer) FlatScanEmpty

func (s *Syncer) 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 (*Syncer) FlatSyncSnapshot

func (s *Syncer) 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 (*Syncer) InitAndStart

func (s *Syncer) InitAndStart() error

func (*Syncer) InitSync

func (s *Syncer) InitSync(ctx context.Context) error

func (*Syncer) NotifyError

func (s *Syncer) NotifyError(errorPath string)

func (*Syncer) Start

func (s *Syncer) Start()

func (*Syncer) StartConfigsOnly

func (s *Syncer) StartConfigsOnly()

func (*Syncer) Stop

func (s *Syncer) Stop()

func (*Syncer) StopConfigsOnly

func (s *Syncer) StopConfigsOnly()

Jump to

Keyboard shortcuts

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