service

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGRPCNotMounted         = status.Error(codes.FailedPrecondition, "filesystem not mounted")
	ErrGRPCInvalidArgument    = status.Error(codes.InvalidArgument, "invalid argument")
	ErrGRPCFailedPrecondition = status.Error(codes.FailedPrecondition, "failed precondition")
	ErrGRPCAlreadyExists      = status.Error(codes.AlreadyExists, "already exists")
	ErrGRPCNotFound           = status.Error(codes.NotFound, "notFound")
	ErrGRPCReadOnlyShare      = status.Error(codes.PermissionDenied, "share is read-only")
)

Functions

func IsInternalPath added in v0.4.1

func IsInternalPath(path string) bool

IsInternalPath reports whether the path names an internal file that must never sync: FUSE hidden renames, macOS metadata, download bitmap sidecars.

Types

type KeibidropServiceImpl

type KeibidropServiceImpl struct {
	bindings.UnimplementedKeibiServiceServer
	Session      *session.Session
	Logger       *slog.Logger
	SyncTracker  *synctracker.SyncTracker
	OnEvent      func(string)
	OnDisconnect func() // Called (in goroutine) when peer sends DISCONNECT; cancels context to trigger cleanup.

	// ShareReadOnly rejects every inbound mutation (add/edit/remove/rename,
	// file or dir) before it touches disk or the tracker. The origin-side
	// guarantee behind the read_only share mode; DISCONNECT still passes.
	ShareReadOnly bool
	// contains filtered or unexported fields
}

func (*KeibidropServiceImpl) BatchNotify

BatchNotify processes multiple notifications in a single RPC call. This eliminates per-notification round-trip overhead during large clones.

func (*KeibidropServiceImpl) Debug

func (*KeibidropServiceImpl) FS

FS returns the current FUSE tree, or nil before the first publish or after unmount. Handlers nil-check per call.

func (*KeibidropServiceImpl) GetChunkHashes added in v0.3.6

GetChunkHashes streams per-chunk xxh3-64 fingerprints for a file. Path resolution and authorization mirror StreamFile exactly.

func (*KeibidropServiceImpl) Heartbeat

Heartbeat responds to connection health checks. Used by HealthMonitor to detect connection loss.

func (*KeibidropServiceImpl) Notify

func (*KeibidropServiceImpl) Read

func (*KeibidropServiceImpl) Rekey

Rekey drives the responder side of the entropy fold: an ephemeral hybrid-KEM whose shared secret mixes into the session ratchet for post-quantum forward secrecy. Self-synchronizing on the wire (no mid-stream key swap), so a stray or forged Rekey can't brick the connection.

func (*KeibidropServiceImpl) SetFS added in v0.4.0

func (kd *KeibidropServiceImpl) SetFS(f *filesystem.FS)

SetFS publishes the FUSE tree to running handlers.

func (*KeibidropServiceImpl) StreamFile

StreamFile pushes an entire file's contents to the client in sequential chunks. The client sends one request; the server streams all data from start_offset to EOF with no per-chunk round-trip overhead.

Jump to

Keyboard shortcuts

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