Documentation
¶
Index ¶
- Variables
- func IsInternalPath(path string) bool
- type KeibidropServiceImpl
- func (kd *KeibidropServiceImpl) BatchNotify(ctx context.Context, req *bindings.BatchNotifyRequest) (*bindings.BatchNotifyResponse, error)
- func (kd *KeibidropServiceImpl) Debug(context.Context, *bindings.DebugRequest) (*bindings.DebugResponse, error)
- func (kd *KeibidropServiceImpl) FS() *filesystem.FS
- func (kd *KeibidropServiceImpl) GetChunkHashes(req *bindings.GetChunkHashesRequest, ...) error
- func (kd *KeibidropServiceImpl) Heartbeat(_ context.Context, req *bindings.HeartbeatRequest) (*bindings.HeartbeatResponse, error)
- func (kd *KeibidropServiceImpl) Notify(_ context.Context, req *bindings.NotifyRequest) (*bindings.NotifyResponse, error)
- func (kd *KeibidropServiceImpl) Read(stream bindings.KeibiService_ReadServer) error
- func (kd *KeibidropServiceImpl) Rekey(_ context.Context, req *bindings.RekeyRequest) (*bindings.RekeyResponse, error)
- func (kd *KeibidropServiceImpl) SetFS(f *filesystem.FS)
- func (kd *KeibidropServiceImpl) StreamFile(req *bindings.StreamFileRequest, stream bindings.KeibiService_StreamFileServer) error
Constants ¶
This section is empty.
Variables ¶
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") )
Functions ¶
func IsInternalPath ¶ added in v0.4.1
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.
// 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 ¶
func (kd *KeibidropServiceImpl) BatchNotify(ctx context.Context, req *bindings.BatchNotifyRequest) (*bindings.BatchNotifyResponse, error)
BatchNotify processes multiple notifications in a single RPC call. This eliminates per-notification round-trip overhead during large clones.
func (*KeibidropServiceImpl) Debug ¶
func (kd *KeibidropServiceImpl) Debug(context.Context, *bindings.DebugRequest) (*bindings.DebugResponse, error)
func (*KeibidropServiceImpl) FS ¶
func (kd *KeibidropServiceImpl) FS() *filesystem.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
func (kd *KeibidropServiceImpl) GetChunkHashes(req *bindings.GetChunkHashesRequest, stream bindings.KeibiService_GetChunkHashesServer) error
GetChunkHashes streams per-chunk xxh3-64 fingerprints for a file. Path resolution and authorization mirror StreamFile exactly.
func (*KeibidropServiceImpl) Heartbeat ¶
func (kd *KeibidropServiceImpl) Heartbeat(_ context.Context, req *bindings.HeartbeatRequest) (*bindings.HeartbeatResponse, error)
Heartbeat responds to connection health checks. Used by HealthMonitor to detect connection loss.
func (*KeibidropServiceImpl) Notify ¶
func (kd *KeibidropServiceImpl) Notify(_ context.Context, req *bindings.NotifyRequest) (*bindings.NotifyResponse, error)
func (*KeibidropServiceImpl) Read ¶
func (kd *KeibidropServiceImpl) Read(stream bindings.KeibiService_ReadServer) error
func (*KeibidropServiceImpl) Rekey ¶
func (kd *KeibidropServiceImpl) Rekey(_ context.Context, req *bindings.RekeyRequest) (*bindings.RekeyResponse, error)
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 ¶
func (kd *KeibidropServiceImpl) StreamFile(req *bindings.StreamFileRequest, stream bindings.KeibiService_StreamFileServer) error
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.