common

package
v0.0.0-...-13222ce Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DEBUG_TAG = "[DEBUG]"
View Source
const ERR_TAG = "[ERR]"

Variables

This section is empty.

Functions

func GetHTTPTransport

func GetHTTPTransport() *http.Transport

func GetStdLogger

func GetStdLogger(l *LogHandle, lvl logrus.Level) *glog.Logger

func InitLoggers

func InitLoggers(logToSyslog bool)

func LogPanic

func LogPanic(err *error)

func SetCloudLogLevel

func SetCloudLogLevel(level logrus.Level)

Types

type FlagStorage

type FlagStorage struct {
	// File system
	MountOptions      map[string]string
	MountPoint        string
	MountPointArg     string
	MountPointCreated string

	Cache    []string
	DirMode  os.FileMode
	FileMode os.FileMode
	Uid      uint32
	Gid      uint32

	// Common Backend Config
	UseContentType bool
	Endpoint       string

	Backend interface{}

	// Tuning
	Cheap        bool
	ExplicitDir  bool
	StatCacheTTL time.Duration
	TypeCacheTTL time.Duration
	HTTPTimeout  time.Duration

	// Debugging
	DebugFuse  bool
	DebugS3    bool
	Foreground bool
}

func (*FlagStorage) Cleanup

func (flags *FlagStorage) Cleanup()

func (*FlagStorage) GetMimeType

func (flags *FlagStorage) GetMimeType(fileName string) (retMime *string)

type FusePanicLogger

type FusePanicLogger struct {
	Fs fuseutil.FileSystem
}

func (FusePanicLogger) BatchForget

func (fs FusePanicLogger) BatchForget(ctx context.Context, op *fuseops.BatchForgetOp) (err error)

func (FusePanicLogger) CreateFile

func (fs FusePanicLogger) CreateFile(ctx context.Context, op *fuseops.CreateFileOp) (err error)
func (fs FusePanicLogger) CreateLink(ctx context.Context, op *fuseops.CreateLinkOp) (err error)
func (fs FusePanicLogger) CreateSymlink(ctx context.Context, op *fuseops.CreateSymlinkOp) (err error)

func (FusePanicLogger) Destroy

func (fs FusePanicLogger) Destroy()

func (FusePanicLogger) Fallocate

func (fs FusePanicLogger) Fallocate(ctx context.Context, op *fuseops.FallocateOp) (err error)

func (FusePanicLogger) FlushFile

func (fs FusePanicLogger) FlushFile(ctx context.Context, op *fuseops.FlushFileOp) (err error)

func (FusePanicLogger) ForgetInode

func (fs FusePanicLogger) ForgetInode(ctx context.Context, op *fuseops.ForgetInodeOp) (err error)

func (FusePanicLogger) GetInodeAttributes

func (fs FusePanicLogger) GetInodeAttributes(ctx context.Context, op *fuseops.GetInodeAttributesOp) (err error)

func (FusePanicLogger) GetXattr

func (fs FusePanicLogger) GetXattr(ctx context.Context, op *fuseops.GetXattrOp) (err error)

func (FusePanicLogger) ListXattr

func (fs FusePanicLogger) ListXattr(ctx context.Context, op *fuseops.ListXattrOp) (err error)

func (FusePanicLogger) LookUpInode

func (fs FusePanicLogger) LookUpInode(ctx context.Context, op *fuseops.LookUpInodeOp) (err error)

func (FusePanicLogger) MkDir

func (fs FusePanicLogger) MkDir(ctx context.Context, op *fuseops.MkDirOp) (err error)

func (FusePanicLogger) MkNode

func (fs FusePanicLogger) MkNode(ctx context.Context, op *fuseops.MkNodeOp) (err error)

func (FusePanicLogger) OpenDir

func (fs FusePanicLogger) OpenDir(ctx context.Context, op *fuseops.OpenDirOp) (err error)

func (FusePanicLogger) OpenFile

func (fs FusePanicLogger) OpenFile(ctx context.Context, op *fuseops.OpenFileOp) (err error)

func (FusePanicLogger) ReadDir

func (fs FusePanicLogger) ReadDir(ctx context.Context, op *fuseops.ReadDirOp) (err error)

func (FusePanicLogger) ReadFile

func (fs FusePanicLogger) ReadFile(ctx context.Context, op *fuseops.ReadFileOp) (err error)
func (fs FusePanicLogger) ReadSymlink(ctx context.Context, op *fuseops.ReadSymlinkOp) (err error)

func (FusePanicLogger) ReleaseDirHandle

func (fs FusePanicLogger) ReleaseDirHandle(ctx context.Context, op *fuseops.ReleaseDirHandleOp) (err error)

func (FusePanicLogger) ReleaseFileHandle

func (fs FusePanicLogger) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseFileHandleOp) (err error)

func (FusePanicLogger) RemoveXattr

func (fs FusePanicLogger) RemoveXattr(ctx context.Context, op *fuseops.RemoveXattrOp) (err error)

func (FusePanicLogger) Rename

func (fs FusePanicLogger) Rename(ctx context.Context, op *fuseops.RenameOp) (err error)

func (FusePanicLogger) RmDir

func (fs FusePanicLogger) RmDir(ctx context.Context, op *fuseops.RmDirOp) (err error)

func (FusePanicLogger) SetInodeAttributes

func (fs FusePanicLogger) SetInodeAttributes(ctx context.Context, op *fuseops.SetInodeAttributesOp) (err error)

func (FusePanicLogger) SetXattr

func (fs FusePanicLogger) SetXattr(ctx context.Context, op *fuseops.SetXattrOp) (err error)

func (FusePanicLogger) StatFS

func (fs FusePanicLogger) StatFS(ctx context.Context, op *fuseops.StatFSOp) (err error)

func (FusePanicLogger) SyncFile

func (fs FusePanicLogger) SyncFile(ctx context.Context, op *fuseops.SyncFileOp) (err error)
func (fs FusePanicLogger) Unlink(ctx context.Context, op *fuseops.UnlinkOp) (err error)

func (FusePanicLogger) WriteFile

func (fs FusePanicLogger) WriteFile(ctx context.Context, op *fuseops.WriteFileOp) (err error)

type GCSConfig

type GCSConfig struct {
	Credentials *google.Credentials
	ChunkSize   int // determine the size of chunks when uploading a file to GCS
}

func NewGCSConfig

func NewGCSConfig() *GCSConfig

NewGCSConfig returns a GCS Config.

type LogHandle

type LogHandle struct {
	logrus.Logger

	Lvl *logrus.Level
	// contains filtered or unexported fields
}

func GetLogger

func GetLogger(name string) *LogHandle

func NewLogger

func NewLogger(name string) *LogHandle

func (*LogHandle) Format

func (l *LogHandle) Format(e *logrus.Entry) ([]byte, error)

func (*LogHandle) Log

func (l *LogHandle) Log(args ...interface{})

for aws.Logger

type RetryHTTPLogger

type RetryHTTPLogger struct {
	*LogHandle
}

func (RetryHTTPLogger) Printf

func (logger RetryHTTPLogger) Printf(format string, args ...interface{})

type S3Config

type S3Config struct {
	Profile         string
	AccessKey       string
	SecretKey       string
	RoleArn         string
	RoleExternalId  string
	RoleSessionName string
	StsEndpoint     string

	RequesterPays bool
	Region        string
	RegionSet     bool

	StorageClass string

	UseSSE     bool
	UseKMS     bool
	KMSKeyID   string
	SseC       string
	SseCDigest string
	ACL        string

	Subdomain bool

	Credentials *credentials.Credentials
	Session     *session.Session

	BucketOwner string
}

func (*S3Config) Init

func (c *S3Config) Init() *S3Config

func (*S3Config) ToAwsConfig

func (c *S3Config) ToAwsConfig(flags *FlagStorage) (*aws.Config, error)

Jump to

Keyboard shortcuts

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