faoimpls

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

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/>.

* 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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanPathFAO

type CleanPathFAO struct {
	fao.ProxyFAO
}

func (*CleanPathFAO) Create

func (f *CleanPathFAO) Create(path string, name string) (fao.NodeInfo, error)

func (*CleanPathFAO) MkDir

func (f *CleanPathFAO) MkDir(path string, name string) (fao.NodeInfo, error)

func (*CleanPathFAO) Move

func (f *CleanPathFAO) Move(source string, parent string, name string) error

func (*CleanPathFAO) Read

func (f *CleanPathFAO) Read(path string, dest []byte, off int64) (int, error)

func (*CleanPathFAO) ReadAll

func (f *CleanPathFAO) ReadAll(path string) (io.ReadCloser, error)

func (*CleanPathFAO) ReadDir

func (f *CleanPathFAO) ReadDir(path string) ([]fao.NodeInfo, error)

func (*CleanPathFAO) Stat

func (f *CleanPathFAO) Stat(path string) (fao.NodeInfo, bool, error)
func (f *CleanPathFAO) Symlink(parent string, name string, target string) (fao.NodeInfo, error)

func (*CleanPathFAO) Truncate

func (f *CleanPathFAO) Truncate(path string, size uint64) error
func (f *CleanPathFAO) Unlink(path string) error

func (*CleanPathFAO) Write

func (f *CleanPathFAO) Write(path string, src []byte, off int64) (int, error)

type D_PuterFAO

type D_PuterFAO struct {
	EnqueueOperationRequest func(
		operation putersdk.Operation,
		blob []byte,
	) engine.OperationRequestPromise
}

type D_TreeCacheFAO

type D_TreeCacheFAO struct {
	*engine.VirtualTreeService
	*engine.AssociationService
}

type FileReadCacheFAO

type FileReadCacheFAO struct {
	fao.ProxyFAO

	P_FileReadCacheFAO
	// contains filtered or unexported fields
}

func CreateFileReadCacheFAO

func CreateFileReadCacheFAO(delegate fao.FAO, services services.IServiceContainer, params P_FileReadCacheFAO) *FileReadCacheFAO

func (*FileReadCacheFAO) Read

func (f *FileReadCacheFAO) Read(path string, dest []byte, offset int64) (int, error)

type FileWriteCacheFAO

type FileWriteCacheFAO struct {
	fao.ProxyFAO
	// contains filtered or unexported fields
}

func CreateFileWriteCacheFAO

func CreateFileWriteCacheFAO(delegate fao.FAO, services services.IServiceContainer) *FileWriteCacheFAO

func (*FileWriteCacheFAO) Read

func (f *FileWriteCacheFAO) Read(path string, dest []byte, offset int64) (int, error)

func (*FileWriteCacheFAO) Write

func (f *FileWriteCacheFAO) Write(path string, data []byte, offset int64) (int, error)

type IC_PuterFAO

type IC_PuterFAO interface {
	engine.I_Batcher_EnqueueOperationRequest
}

type LogFAO

type LogFAO struct {
	fao.ProxyFAO
	Log debug.ILogger
}

LogFAO struct definition.

func CreateLogFAO

func CreateLogFAO(delegate fao.FAO, logger debug.ILogger) *LogFAO

CreateLogFAO creates a new instance of LogFAO.

func (*LogFAO) Create

func (f *LogFAO) Create(path string, name string) (fao.NodeInfo, error)

Implementing the Create method with logging.

func (*LogFAO) MkDir

func (f *LogFAO) MkDir(path string, name string) (fao.NodeInfo, error)

Implementing the MkDir method with logging.

func (*LogFAO) Move

func (f *LogFAO) Move(source, parent, name string) error

Implementing the Move method with logging.

func (*LogFAO) Read

func (f *LogFAO) Read(path string, dest []byte, off int64) (int, error)

Example for Read method

func (*LogFAO) ReadAll

func (f *LogFAO) ReadAll(path string) (io.ReadCloser, error)

Implementing the ReadAll method with logging.

func (*LogFAO) ReadDir

func (f *LogFAO) ReadDir(path string) ([]fao.NodeInfo, error)

Implementing the ReadDir method with logging.

func (*LogFAO) Stat

func (f *LogFAO) Stat(path string) (fao.NodeInfo, bool, error)

Implementing the Stat method with logging.

func (f *LogFAO) Symlink(parent, name, target string) (fao.NodeInfo, error)

Implementing the Symlink method with logging.

func (*LogFAO) Truncate

func (f *LogFAO) Truncate(path string, size uint64) error

Implementing the Truncate method with logging.

func (f *LogFAO) Unlink(path string) error

Implementing the Unlink method with logging.

func (*LogFAO) Write

func (f *LogFAO) Write(path string, src []byte, off int64) (int, error)

Implementing the Write method with logging.

type MemFAO

type MemFAO struct {
	fao.BaseFAO
	Tree *node
}

func CreateMemFAO

func CreateMemFAO() *MemFAO

func (*MemFAO) Create

func (f *MemFAO) Create(path string, name string) (fao.NodeInfo, error)

func (*MemFAO) MkDir

func (f *MemFAO) MkDir(parent, path string) (fao.NodeInfo, error)

func (*MemFAO) Move

func (f *MemFAO) Move(source, parent, name string) error

func (*MemFAO) Read

func (f *MemFAO) Read(path string, dest []byte, off int64) (int, error)

func (*MemFAO) ReadAll

func (f *MemFAO) ReadAll(path string) (io.ReadCloser, error)

func (*MemFAO) ReadDir

func (f *MemFAO) ReadDir(path string) ([]fao.NodeInfo, error)

func (*MemFAO) Stat

func (f *MemFAO) Stat(path string) (fao.NodeInfo, bool, error)
func (f *MemFAO) Symlink(parent, name, target string) (fao.NodeInfo, error)

func (*MemFAO) Truncate

func (f *MemFAO) Truncate(path string, size uint64) error
func (f *MemFAO) Unlink(path string) error

func (*MemFAO) Write

func (f *MemFAO) Write(path string, src []byte, off int64) (int, error)

type P_FileReadCacheFAO

type P_FileReadCacheFAO struct {
	TTL time.Duration
}

type P_PuterFAO

type P_PuterFAO struct {
	SDK     *putersdk.PuterSDK
	ReadFAO fao.FAO
}

type P_TreeCacheFAO

type P_TreeCacheFAO struct {
	TTL time.Duration
}

type PuterFAO

type PuterFAO struct {
	fao.BaseFAO
	P_PuterFAO
	D_PuterFAO
}

func CreatePuterFAO

func CreatePuterFAO(
	params P_PuterFAO,
	deps D_PuterFAO,
) *PuterFAO

func (*PuterFAO) Create

func (f *PuterFAO) Create(path string, name string) (fao.NodeInfo, error)

func (*PuterFAO) MkDir

func (f *PuterFAO) MkDir(parent string, path string) (fao.NodeInfo, error)

func (*PuterFAO) Move

func (f *PuterFAO) Move(source string, parent string, name string) error

func (*PuterFAO) Read

func (f *PuterFAO) Read(path string, dest []byte, off int64) (int, error)

func (*PuterFAO) ReadAll

func (f *PuterFAO) ReadAll(path string) (io.ReadCloser, error)

func (*PuterFAO) ReadDir

func (f *PuterFAO) ReadDir(path string) ([]fao.NodeInfo, error)

func (*PuterFAO) Stat

func (f *PuterFAO) Stat(path string) (fao.NodeInfo, bool, error)
func (f *PuterFAO) Symlink(parent string, name string, target string) (fao.NodeInfo, error)

func (*PuterFAO) Truncate

func (f *PuterFAO) Truncate(path string, size uint64) error
func (f *PuterFAO) Unlink(path string) error

func (*PuterFAO) Write

func (f *PuterFAO) Write(path string, src []byte, off int64) (int, error)

type RemoteToLocalUIDFAO

type RemoteToLocalUIDFAO struct {
	fao.ProxyFAO
	// contains filtered or unexported fields
}

func CreateRemoteToLocalUIDFAO

func CreateRemoteToLocalUIDFAO(
	delegate fao.FAO,
	services services.IServiceContainer,
) *RemoteToLocalUIDFAO

func (*RemoteToLocalUIDFAO) Create

func (f *RemoteToLocalUIDFAO) Create(path string, name string) (fao.NodeInfo, error)

func (*RemoteToLocalUIDFAO) MkDir

func (f *RemoteToLocalUIDFAO) MkDir(parent, path string) (fao.NodeInfo, error)

func (*RemoteToLocalUIDFAO) ReadDir

func (f *RemoteToLocalUIDFAO) ReadDir(path string) ([]fao.NodeInfo, error)

func (*RemoteToLocalUIDFAO) Stat

func (f *RemoteToLocalUIDFAO) Stat(path string) (fao.NodeInfo, bool, error)

type SlowFAO

type SlowFAO struct {
	fao.ProxyFAO
	Delay time.Duration
}

func CreateSlowFAO

func CreateSlowFAO(delegate fao.FAO, d time.Duration) *SlowFAO

func (*SlowFAO) Create

func (f *SlowFAO) Create(path string, name string) (fao.NodeInfo, error)

func (*SlowFAO) MkDir

func (f *SlowFAO) MkDir(parent, path string) (fao.NodeInfo, error)

func (*SlowFAO) Move

func (f *SlowFAO) Move(source, parent, name string) error

func (*SlowFAO) Read

func (f *SlowFAO) Read(path string, dest []byte, off int64) (int, error)

func (*SlowFAO) ReadDir

func (f *SlowFAO) ReadDir(path string) ([]fao.NodeInfo, error)

func (*SlowFAO) Stat

func (f *SlowFAO) Stat(path string) (fao.NodeInfo, bool, error)
func (f *SlowFAO) Symlink(parent, name, target string) (fao.NodeInfo, error)

func (*SlowFAO) Truncate

func (f *SlowFAO) Truncate(path string, size uint64) error
func (f *SlowFAO) Unlink(path string) error

func (*SlowFAO) Write

func (f *SlowFAO) Write(path string, src []byte, off int64) (int, error)

type TreeCacheFAO

type TreeCacheFAO struct {
	fao.ProxyFAO
	P_TreeCacheFAO
	D_TreeCacheFAO
}

func CreateTreeCacheFAO

func CreateTreeCacheFAO(
	delegate fao.FAO,
	params P_TreeCacheFAO,
	deps D_TreeCacheFAO,
) *TreeCacheFAO

func (*TreeCacheFAO) Create

func (f *TreeCacheFAO) Create(parent string, path string) (fao.NodeInfo, error)

func (*TreeCacheFAO) MkDir

func (f *TreeCacheFAO) MkDir(parent string, path string) (fao.NodeInfo, error)

func (*TreeCacheFAO) Move

func (f *TreeCacheFAO) Move(oldPath, newParentPath, name string) error

func (*TreeCacheFAO) ReadDir

func (f *TreeCacheFAO) ReadDir(path string) ([]fao.NodeInfo, error)

func (*TreeCacheFAO) Stat

func (f *TreeCacheFAO) Stat(path string) (fao.NodeInfo, bool, error)
func (f *TreeCacheFAO) Symlink(parent, name, target string) (fao.NodeInfo, error)
func (f *TreeCacheFAO) Unlink(path string) error

Jump to

Keyboard shortcuts

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