Documentation ¶
Index ¶
- Variables
- func FIOMaps() map[string]*FIOMap
- func FIOMapsEnabled() map[string]*FIOMap
- func GetInode(npath string) uint64
- func GetInodeIfRegistered(npath string) (uint64, bool)
- func GetMapStringKeys(m map[string]interface{}) []string
- func IsRootPath(rootpath string) bool
- func PrettyPrint(v interface{}) ([]byte, error)
- func RegisterRoot(fm *FIOMap)
- func RootPathsEnabled() []string
- type FIOInternal
- func (sf *FIOInternal) FIOPath() string
- func (sf *FIOInternal) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (sf *FIOInternal) Lookup(n *SfsNode, ctx context.Context, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno)
- func (sf *FIOInternal) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (sf *FIOInternal) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (sf *FIOInternal) Readdir(n *SfsNode, ctx context.Context) (out fs.DirStream, errno syscall.Errno)
- type FIOMap
- type FIORoot
- type FIOSecretsFiles
- func (sf *FIOSecretsFiles) FIOPath() string
- func (sf *FIOSecretsFiles) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (sf *FIOSecretsFiles) Lookup(n *SfsNode, ctx context.Context, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno)
- func (sf *FIOSecretsFiles) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (sf *FIOSecretsFiles) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (sf *FIOSecretsFiles) Readdir(n *SfsNode, ctx context.Context) (out fs.DirStream, errno syscall.Errno)
- type FIOTemplateFiles
- func (sf *FIOTemplateFiles) FIOPath() string
- func (sf *FIOTemplateFiles) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (sf *FIOTemplateFiles) Lookup(n *SfsNode, ctx context.Context, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno)
- func (sf *FIOTemplateFiles) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (sf *FIOTemplateFiles) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (sf *FIOTemplateFiles) Readdir(n *SfsNode, ctx context.Context) (out fs.DirStream, errno syscall.Errno)
- type FIOTest
- func (sf *FIOTest) FIOPath() string
- func (sf *FIOTest) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (sf *FIOTest) Lookup(n *SfsNode, ctx context.Context, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno)
- func (sf *FIOTest) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (sf *FIOTest) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (sf *FIOTest) Readdir(n *SfsNode, ctx context.Context) (out fs.DirStream, errno syscall.Errno)
- type SfsNode
- func (n *SfsNode) Getattr(ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
- func (n *SfsNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *SfsNode) NPath() string
- func (n *SfsNode) OnAdd(ctx context.Context)
- func (n *SfsNode) Open(ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
- func (n *SfsNode) Read(ctx context.Context, fh fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
- func (n *SfsNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
Constants ¶
This section is empty.
Variables ¶
var TEMPLATESPATHS map[string]string
Functions ¶
func FIOMaps ¶ added in v1.0.0
FIOMaps returns all registered FIO Plugins mapped with their mountpaths. Generally used by rootnode so it can correctly redirect calls to corresponding plugins.
func FIOMapsEnabled ¶ added in v1.0.0
FIOMapsEnabled returns a map[string]*FIOMap only with enabled FIOMaps
func GetInode ¶ added in v1.0.0
GetInode returns a valid inode for npath. If it isn't registered yet, it will be registered
func GetInodeIfRegistered ¶ added in v1.0.0
GetInodeIfRegistered returns the inode if it is registered, won't register it if it isn't already registered
func GetMapStringKeys ¶ added in v1.0.0
GetMapStringKeys returns []string containing all keys from a map[string]interface{}
func IsRootPath ¶ added in v1.0.0
IsRootPath checks whether the given rootpath is registered and enabled in fiomaps
func PrettyPrint ¶ added in v1.0.0
PrettyPrint variable (struct, map, array, slice) in Golang https://siongui.github.io/2016/01/30/go-pretty-print-variable/
func RegisterRoot ¶ added in v1.0.0
func RegisterRoot(fm *FIOMap)
RegisterRoot registers FIOMaps. To be used inside of init() function of plugins. If FIO is enabled due to configuration, also enable it. If not, only register in in Disabled state.
func RootPathsEnabled ¶ added in v1.0.0
func RootPathsEnabled() []string
RootPathsEnabled returns all registered fioRootPaths that are enabled
Types ¶
type FIOInternal ¶ added in v1.0.0
type FIOInternal struct{}
func (*FIOInternal) FIOPath ¶ added in v1.0.0
func (sf *FIOInternal) FIOPath() string
FIOPath returns name of implemented FIO Plugin sf := Secretsfs Fio
func (*FIOInternal) Getattr ¶ added in v1.0.0
func (sf *FIOInternal) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
func (*FIOInternal) Lookup ¶ added in v1.0.0
func (sf *FIOInternal) Lookup(n *SfsNode, ctx context.Context, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno)
Lookuper
func (*FIOInternal) Open ¶ added in v1.0.0
func (sf *FIOInternal) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
Opener
func (*FIOInternal) Read ¶ added in v1.0.0
func (sf *FIOInternal) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
Reader
type FIOMap ¶ added in v1.0.0
FIOMap maps the FIORoot Node to a Mountpath Used for registering FIORoots to the secretsfs rootnode
type FIORoot ¶ added in v1.0.0
type FIORoot interface { // Node Operations Readdir(n *SfsNode, ctx context.Context) (out fs.DirStream, errno syscall.Errno) Lookup(n *SfsNode, ctx context.Context, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno // FIOPath() is used for registering and finding FIOMaps FIOPath() string }
FIORoot interface describes functions a new FIO plugin should implement.
type FIOSecretsFiles ¶ added in v1.0.0
type FIOSecretsFiles struct{}
func (*FIOSecretsFiles) FIOPath ¶ added in v1.0.0
func (sf *FIOSecretsFiles) FIOPath() string
func (*FIOSecretsFiles) Getattr ¶ added in v1.0.0
func (sf *FIOSecretsFiles) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
func (*FIOSecretsFiles) Open ¶ added in v1.0.0
func (sf *FIOSecretsFiles) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
func (*FIOSecretsFiles) Read ¶ added in v1.0.0
func (sf *FIOSecretsFiles) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
type FIOTemplateFiles ¶ added in v1.0.0
type FIOTemplateFiles struct{}
func (*FIOTemplateFiles) FIOPath ¶ added in v1.0.0
func (sf *FIOTemplateFiles) FIOPath() string
func (*FIOTemplateFiles) Getattr ¶ added in v1.0.0
func (sf *FIOTemplateFiles) Getattr(n *SfsNode, ctx context.Context, fh fs.FileHandle, out *fuse.AttrOut) syscall.Errno
func (*FIOTemplateFiles) Open ¶ added in v1.0.0
func (sf *FIOTemplateFiles) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
func (*FIOTemplateFiles) Read ¶ added in v1.0.0
func (sf *FIOTemplateFiles) Read(n *SfsNode, ctx context.Context, f fs.FileHandle, dest []byte, off int64) (fuse.ReadResult, syscall.Errno)
type FIOTest ¶ added in v1.0.0
type FIOTest struct{}
func (*FIOTest) FIOPath ¶ added in v1.0.0
FIOPath returns name of implemented FIO Plugin sf := Secretsfs Fio
func (*FIOTest) Lookup ¶ added in v1.0.0
func (sf *FIOTest) Lookup(n *SfsNode, ctx context.Context, name string, out *fuse.EntryOut) (node *fs.Inode, errno syscall.Errno)
Lookuper
func (*FIOTest) Open ¶ added in v1.0.0
func (sf *FIOTest) Open(n *SfsNode, ctx context.Context, flags uint32) (fh fs.FileHandle, fuseFlags uint32, errno syscall.Errno)
Opener