Documentation ¶
Overview ¶
* Copyright (C) 2024 Puter Technologies Inc. * * This file is part of puter-fuse. * * puter-fuse is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* Copyright (C) 2024 Puter Technologies Inc. * * This file is part of puter-fuse. * * puter-fuse is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* Copyright (C) 2024 Puter Technologies Inc. * * This file is part of puter-fuse. * * puter-fuse is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* Copyright (C) 2024 Puter Technologies Inc. * * This file is part of puter-fuse. * * puter-fuse is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* Copyright (C) 2024 Puter Technologies Inc. * * This file is part of puter-fuse. * * puter-fuse is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* Copyright (C) 2024 Puter Technologies Inc. * * This file is part of puter-fuse. * * puter-fuse is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- type CloudItemNode
- type DirectoryNode
- func (n *DirectoryNode) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (node *fs.Inode, fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *DirectoryNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *DirectoryNode) Init()
- func (n *DirectoryNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *DirectoryNode) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *DirectoryNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
- func (n *DirectoryNode) Rename(ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, ...) syscall.Errno
- func (n *DirectoryNode) Rmdir(ctx context.Context, name string) syscall.Errno
- func (n *DirectoryNode) Symlink(ctx context.Context, target string, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *DirectoryNode) Unlink(ctx context.Context, name string) syscall.Errno
- type FileHandler
- type FileNode
- func (n *FileNode) Fsync(ctx context.Context, f fs.FileHandle, flags uint32) syscall.Errno
- func (n *FileNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *FileNode) Init()
- func (n *FileNode) Open(ctx context.Context, flags uint32) (fs.FileHandle, uint32, syscall.Errno)
- func (n *FileNode) Read(ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (n *FileNode) Readlink(ctx context.Context) ([]byte, syscall.Errno)
- func (n *FileNode) Setattr(ctx context.Context, f fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
- func (n *FileNode) Write(ctx context.Context, f fs.FileHandle, data []byte, off int64) (uint32, syscall.Errno)
- type Filesystem
- func (pfs *Filesystem) CreateDirNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
- func (pfs *Filesystem) CreateFileNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
- func (fs *Filesystem) CreateNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
- func (fs *Filesystem) GetInoFromUID(uid string) uint64
- func (fs *Filesystem) GetNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
- func (pfs *Filesystem) Init()
- type HasPuterNodeCapabilities
- type RootNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudItemNode ¶
type CloudItemNode struct { *Filesystem CloudItem fao.NodeInfo }
func (*CloudItemNode) GetIno ¶
func (n *CloudItemNode) GetIno() uint64
func (*CloudItemNode) GetStableAttrMode ¶
func (n *CloudItemNode) GetStableAttrMode() uint32
func (*CloudItemNode) Init ¶
func (n *CloudItemNode) Init()
func (*CloudItemNode) SetCloudItem ¶
func (n *CloudItemNode) SetCloudItem(cloudItem fao.NodeInfo)
type DirectoryNode ¶
type DirectoryNode struct { fs.Inode CloudItemNode Items []fao.NodeInfo PollDuration time.Duration Logger debug.ILogger PathLockMap *kvdotgo.KVMap[string, struct{}] }
func (*DirectoryNode) Getattr ¶
func (n *DirectoryNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) syscall.Errno
func (*DirectoryNode) Init ¶
func (n *DirectoryNode) Init()
func (*DirectoryNode) Rename ¶
func (n *DirectoryNode) Rename( ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, flags uint32, ) syscall.Errno
type FileHandler ¶
type FileHandler struct {
Node *FileNode
}
type FileNode ¶
type FileNode struct { fs.Inode CloudItemNode Logger debug.ILogger }
type Filesystem ¶
type Filesystem struct { // map Puter UIDs to inode numbers UidInoMap map[string]uint64 InoCounter uint64 Nodes map[uint64]fs.InodeEmbedder SDK *putersdk.PuterSDK fao.FAO Services *services.ServicesContainer NodesMutex sync.RWMutex UidInoMapMutex sync.RWMutex }
func (*Filesystem) CreateDirNodeFromCloudItem ¶
func (pfs *Filesystem) CreateDirNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
func (*Filesystem) CreateFileNodeFromCloudItem ¶
func (pfs *Filesystem) CreateFileNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
func (*Filesystem) CreateNodeFromCloudItem ¶
func (fs *Filesystem) CreateNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
func (*Filesystem) GetInoFromUID ¶
func (fs *Filesystem) GetInoFromUID(uid string) uint64
func (*Filesystem) GetNodeFromCloudItem ¶
func (fs *Filesystem) GetNodeFromCloudItem(cloudItem fao.NodeInfo) fs.InodeEmbedder
func (*Filesystem) Init ¶
func (pfs *Filesystem) Init()