tagsfs

package
v0.0.0-...-98f36a1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TagsFs

type TagsFs struct {
	pathfs.FileSystem

	Client     *ec2.EC2
	InstanceID string
	Logger     logger.LeveledLogger
}

TagsFs represents a filesystem that exposes the instance tags Satisfies pathfs.FileSystem Currently is readonly

func New

func New(client *ec2.EC2, instanceID string, l logger.LeveledLogger) *TagsFs

New initializes a new TagsFs that uses the given AWS client

func (*TagsFs) GetAttr

func (fs *TagsFs) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status)

GetAttr returns an fuse.Attr representing a read-only file or directory

func (*TagsFs) Open

func (fs *TagsFs) Open(name string, flags uint32, context *fuse.Context) (file nodefs.File, code fuse.Status)

Open returns a datafile representing the tag value

func (*TagsFs) OpenDir

func (fs *TagsFs) OpenDir(name string, context *fuse.Context) (c []fuse.DirEntry, code fuse.Status)

OpenDir returns the list of paths under the given path GetAttr is called on the file first, so we do not worry about this being called on non-dirs

Jump to

Keyboard shortcuts

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