options

package
v2.16.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncPropagatorOptions added in v2.16.0

type AsyncPropagatorOptions struct {
	PropagationDelay time.Duration `mapstructure:"propagation_delay"`
}

AsyncPropagatorOptions holds the configuration for the async propagator

type EventOptions added in v2.13.0

type EventOptions struct {
	NatsAddress          string `mapstructure:"natsaddress"`
	NatsClusterID        string `mapstructure:"natsclusterid"`
	TLSInsecure          bool   `mapstructure:"tlsinsecure"`
	TLSRootCACertificate string `mapstructure:"tlsrootcacertificate"`
	NumConsumers         int    `mapstructure:"numconsumers"`
}

EventOptions are the configurable options for events

type Option

type Option func(o *Options)

Option defines a single option function.

type Options

type Options struct {

	// the gateway address
	GatewayAddr string `mapstructure:"gateway_addr"`

	// the metadata backend to use, currently supports `xattr` or `ini`
	MetadataBackend string `mapstructure:"metadata_backend"`

	// the propagator to use for this fs. currently only `sync` is fully supported, `async` is available as an experimental feature
	Propagator string `mapstructure:"propagator"`
	// Options specific to the async propagator
	AsyncPropagatorOptions AsyncPropagatorOptions `mapstructure:"async_propagator_options"`

	// ocis fs works on top of a dir of uuid nodes
	Root string `mapstructure:"root"`

	// UserLayout describes the relative path from the storage's root node to the users home node.
	UserLayout string `mapstructure:"user_layout"`

	// propagate mtime changes as tmtime (tree modification time) to the parent directory when user.ocis.propagation=1 is set on a node
	TreeTimeAccounting bool `mapstructure:"treetime_accounting"`

	// propagate size changes as treesize
	TreeSizeAccounting bool `mapstructure:"treesize_accounting"`

	// permissions service to use when checking permissions
	PermissionsSVC           string `mapstructure:"permissionssvc"`
	PermissionsClientTLSMode string `mapstructure:"permissionssvc_tls_mode"`
	PermTLSMode              pool.TLSMode

	PersonalSpaceAliasTemplate string `mapstructure:"personalspacealias_template"`
	GeneralSpaceAliasTemplate  string `mapstructure:"generalspacealias_template"`

	AsyncFileUploads bool `mapstructure:"asyncfileuploads"`

	Events EventOptions `mapstructure:"events"`

	Tokens TokenOptions `mapstructure:"tokens"`

	StatCache         cache.Config `mapstructure:"statcache"`
	FileMetadataCache cache.Config `mapstructure:"filemetadatacache"`
	IDCache           cache.Config `mapstructure:"idcache"`

	MaxAcquireLockCycles    int `mapstructure:"max_acquire_lock_cycles"`
	LockCycleDurationFactor int `mapstructure:"lock_cycle_duration_factor"`
	MaxConcurrency          int `mapstructure:"max_concurrency"`

	MaxQuota uint64 `mapstructure:"max_quota"`
}

Options defines the available options for this package.

func New

func New(m map[string]interface{}) (*Options, error)

New returns a new Options instance for the given configuration

type TokenOptions added in v2.13.0

type TokenOptions struct {
	DownloadEndpoint     string `mapstructure:"download_endpoint"`
	DataGatewayEndpoint  string `mapstructure:"datagateway_endpoint"`
	TransferSharedSecret string `mapstructure:"transfer_shared_secret"`
	TransferExpires      int64  `mapstructure:"transfer_expires"`
}

TokenOptions are the configurable option for tokens

Jump to

Keyboard shortcuts

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