cfg

package
v0.40.8 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 38 Imported by: 0

Documentation

Overview

System permissions-related code.

Index

Constants

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

Variables

View Source
var FuseOptions string
View Source
var VersionHash string

Functions

func GetHTTPTransport

func GetHTTPTransport() *http.Transport

func GetStdLogger

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

func InitLoggers

func InitLoggers(logFile string)

func MessageMountFlags

func MessageMountFlags(args []string) (ret []string)

func MyUserAndGroup

func MyUserAndGroup() (int, int)

MyUserAndGroup returns the UID and GID of this process.

func NewApp

func NewApp() (app *cli.App)

func SetCloudLogLevel

func SetCloudLogLevel(level logrus.Level)

Types

type ADLv1Config

type ADLv1Config struct {
	Endpoint   string
	Authorizer autorest.Authorizer
}

func (*ADLv1Config) Init

func (config *ADLv1Config) Init()

type ADLv2Config

type ADLv2Config struct {
	Endpoint   string
	Authorizer autorest.Authorizer
}

type AZBlobConfig

type AZBlobConfig struct {
	Endpoint         string
	AccountName      string
	AccountKey       string
	SasToken         SASTokenProvider
	TokenRenewBuffer time.Duration

	Container string
	Prefix    string
}

func AzureBlobConfig

func AzureBlobConfig(endpoint string, location string, storageType string) (config AZBlobConfig, err error)

func (*AZBlobConfig) Init

func (config *AZBlobConfig) Init()

func (*AZBlobConfig) WithAuthorization

func (config *AZBlobConfig) WithAuthorization() autorest.PrepareDecorator

hijack the SharedKeyCredentials signing code from azure-storage-blob-go https://github.com/Azure/go-autorest/issues/456

type AzureAuthorizerConfig

type AzureAuthorizerConfig struct {
	Log      *LogHandle
	TenantId string
}

func (AzureAuthorizerConfig) Authorizer

func (c AzureAuthorizerConfig) Authorizer() (autorest.Authorizer, error)

type FlagStorage

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

	DirMode  os.FileMode
	FileMode os.FileMode
	Uid      uint32
	Gid      uint32
	Setuid   int
	Setgid   int

	// Common Backend Config
	UseContentType bool
	Endpoint       string
	Backend        interface{}

	// Tuning
	MemoryLimit         uint64
	EntryLimit          int
	GCInterval          uint64
	Cheap               bool
	ExplicitDir         bool
	NoDirObject         bool
	MaxFlushers         int64
	MaxParallelParts    int
	MaxParallelCopy     int
	StatCacheTTL        time.Duration
	HTTPTimeout         time.Duration
	ReadRetryInterval   time.Duration
	ReadRetryMultiplier float64
	ReadRetryMax        time.Duration
	ReadRetryAttempts   int
	RetryInterval       time.Duration
	ReadAheadKB         uint64
	SmallReadCount      uint64
	SmallReadCutoffKB   uint64
	ReadAheadSmallKB    uint64
	LargeReadCutoffKB   uint64
	ReadAheadLargeKB    uint64
	ReadAheadParallelKB uint64
	ReadMergeKB         uint64
	SinglePartMB        uint64
	MaxMergeCopyMB      uint64
	IgnoreFsync         bool
	FsyncOnClose        bool
	EnablePerms         bool
	EnableSpecials      bool
	EnableMtime         bool
	DisableXattr        bool
	UidAttr             string
	GidAttr             string
	FileModeAttr        string
	RdevAttr            string
	MtimeAttr           string
	SymlinkAttr         string
	RefreshAttr         string
	RefreshFilename     string
	FlushFilename       string
	CachePath           string
	MaxDiskCacheFD      int64
	CacheFileMode       os.FileMode
	PartSizes           []PartSizeConfig
	UsePatch            bool
	DropPatchConflicts  bool

	// Debugging
	DebugMain  bool
	DebugFuse  bool
	DebugS3    bool
	PProf      string
	Foreground bool
	LogFile    string
	DebugGrpc  bool

	StatsInterval time.Duration

	// Cluster Mode
	ClusterMode           bool
	ClusterGrpcReflection bool
	ClusterMe             *NodeConfig
	ClusterPeers          []*NodeConfig
}

func DefaultFlags added in v0.38.4

func DefaultFlags() *FlagStorage

func PopulateFlags

func PopulateFlags(c *cli.Context) (ret *FlagStorage)

PopulateFlags adds the flags accepted by run to the supplied flag set, returning the variables into which the flags will parse.

func (*FlagStorage) Cleanup

func (flags *FlagStorage) Cleanup()

func (*FlagStorage) GetMimeType

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

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 NodeConfig

type NodeConfig struct {
	Id      uint64
	Address string
}

type PartSizeConfig

type PartSizeConfig struct {
	PartSize  uint64
	PartCount uint64
}

type RetryHTTPLogger

type RetryHTTPLogger struct {
	*LogHandle
}

func (RetryHTTPLogger) Printf

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

type S3Config

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

	SDKMaxRetries       int
	SDKMinRetryDelay    time.Duration
	SDKMaxRetryDelay    time.Duration
	SDKMinThrottleDelay time.Duration
	SDKMaxThrottleDelay time.Duration

	RequesterPays bool
	Region        string
	RegionSet     bool
	ProjectId     string

	StorageClass string
	ColdMinSize  uint64
	MultipartAge time.Duration

	MultipartCopyThreshold uint64

	UseSSE     bool
	UseKMS     bool
	KMSKeyID   string
	SseC       string
	SseCDigest string
	ACL        string
	NoChecksum bool
	ListV2     bool
	ListV1Ext  bool

	Subdomain bool

	UseIAM    bool
	IAMFlavor string
	IAMUrl    string
	IAMHeader string

	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)

type SASTokenProvider

type SASTokenProvider func() (string, error)

Jump to

Keyboard shortcuts

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