irods

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortDefault                     int           = 1247
	ReadAheadMaxDefault             int           = 1024 * 64 // 64KB
	ConnectionMaxDefault            int           = 10
	OperationTimeoutDefault         time.Duration = 5 * time.Minute
	ConnectionLifespanDefault       time.Duration = 1 * time.Hour
	ConnectionIdleTimeoutDefault    time.Duration = 5 * time.Minute
	MetadataCacheTimeoutDefault     time.Duration = 5 * time.Minute
	MetadataCacheCleanupTimeDefault time.Duration = 5 * time.Minute
)

Variables

This section is empty.

Functions

func GetIRODSAccount added in v0.10.1

func GetIRODSAccount(conn *IRODSFSConnectionInfo) (*irodsclient_types.IRODSAccount, error)

GetIRODSAccount creates a new account

func GetIRODSFilesystem added in v0.10.1

func GetIRODSFilesystem(conn *IRODSFSConnectionInfo) (*irodsclient_fs.FileSystem, error)

GetIRODSFilesystem creates a new filesystem

func GetIRODSFilesystemConfig added in v0.10.1

func GetIRODSFilesystemConfig() *irodsclient_fs.FileSystemConfig

GetIRODSFilesystemConfig creates a new filesystem config

func IsOverlayDriverSupported added in v0.10.1

func IsOverlayDriverSupported() bool

IsOverlayDriverSupported returns if overlay driver is supported

func Mkdir

func Mkdir(conn *IRODSFSConnectionInfo, path string) error

Mkdir creates a new directory

func Mount

func Mount(mounter mounter.Mounter, volID string, configs map[string]string, mntOptions []string, targetPath string) error

func Rmdir

func Rmdir(conn *IRODSFSConnectionInfo, path string) error

Rmdir deletes a directory

func TestConnection

func TestConnection(conn *IRODSFSConnectionInfo) error

TestConnection just test connection creation

func Unmount added in v0.9.2

func Unmount(mounter mounter.Mounter, volID string, configs map[string]string, targetPath string) error

Types

type IRODSFSConfig

type IRODSFSConfig struct {
	Host              string                              `yaml:"host"`
	Port              int                                 `yaml:"port"`
	ProxyUser         string                              `yaml:"proxy_user"`
	ClientUser        string                              `yaml:"client_user"`
	Zone              string                              `yaml:"zone"`
	Password          string                              `yaml:"password"`
	Resource          string                              `yaml:"resource,omitempty"`
	PathMappings      []irodsfs_common_vpath.VPathMapping `yaml:"path_mappings"`
	NoPermissionCheck bool                                `yaml:"no_permission_check"`
	NoSetXattr        bool                                `yaml:"no_set_xattr"`
	UID               int                                 `yaml:"uid"`
	GID               int                                 `yaml:"gid"`
	SystemUser        string                              `yaml:"system_user"`

	DataRootPath string `yaml:"data_root_path,omitempty"`

	LogPath string `yaml:"log_path,omitempty"`

	PoolEndpoint string `yaml:"pool_endpoint,omitempty"`

	ReadAheadMax             int           `yaml:"read_ahead_max"`
	OperationTimeout         time.Duration `yaml:"operation_timeout"`
	ConnectionLifespan       time.Duration `yaml:"connection_lifespan"`
	ConnectionIdleTimeout    time.Duration `yaml:"connection_idle_timeout"`
	ConnectionMax            int           `yaml:"connection_max"`
	MetadataCacheTimeout     time.Duration `yaml:"metadata_cache_timeout"`
	MetadataCacheCleanupTime time.Duration `yaml:"metadata_cache_cleanup_time"`

	MonitorURL string `yaml:"monitor_url,omitempty"`

	Profile            bool `yaml:"profile,omitempty"`
	ProfileServicePort int  `yaml:"profile_service_port,omitempty"`

	AllowOther bool   `yaml:"allow_other,omitempty"`
	InstanceID string `yaml:"instanceid,omitempty"`
}

func NewDefaultIRODSFSConfig

func NewDefaultIRODSFSConfig() *IRODSFSConfig

NewDefaultIRODSFSConfig creates default IRODSFSConfig

type IRODSFSConnectionInfo

type IRODSFSConnectionInfo struct {
	Hostname          string
	Port              int
	Zone              string
	User              string
	Password          string
	ClientUser        string // if this field has a value, user and password fields have proxy user info
	Resource          string
	PoolEndpoint      string
	MonitorURL        string
	PathMappings      []irodsfs_common_vpath.VPathMapping
	NoPermissionCheck bool
	NoSetXattr        bool
	UID               int
	GID               int
	SystemUser        string
	MountTimeout      int
	Profile           bool
	ProfilePort       int
	OverlayFS         bool
	OverlayFSDriver   OverlayFSDriverType
}

IRODSFSConnectionInfo class

func GetConnectionInfo

func GetConnectionInfo(configs map[string]string) (*IRODSFSConnectionInfo, error)

GetConnectionInfo extracts IRODSFSConnectionInfo value from param map

func (*IRODSFSConnectionInfo) IsAnonymousClientUser

func (connInfo *IRODSFSConnectionInfo) IsAnonymousClientUser() bool

IsAnonymousClientUser checks if the client user is anonymous

func (*IRODSFSConnectionInfo) IsAnonymousUser

func (connInfo *IRODSFSConnectionInfo) IsAnonymousUser() bool

IsAnonymousUser checks if the user is anonymous

func (*IRODSFSConnectionInfo) SetAnonymousUser

func (connInfo *IRODSFSConnectionInfo) SetAnonymousUser()

SetAnonymousUser sets anonymous user

type OverlayFSDriverType added in v0.10.1

type OverlayFSDriverType string

OverlayFSDriverType is a overlayfs driver type

const (
	// OverlayDriverType is for kernel built-in overlay
	OverlayDriverType OverlayFSDriverType = "overlay"
	// FuseOverlayFSDriverType is for fuse-overlayfs
	FuseOverlayFSDriverType OverlayFSDriverType = "fuse-overlayfs"
)

overlayfs driver types

func GetOverlayFSDriverType added in v0.10.1

func GetOverlayFSDriverType(driver string) OverlayFSDriverType

GetOverlayFSDriverType returns valid driver type

type OverlayFSSyncher added in v0.10.1

type OverlayFSSyncher struct {
	// contains filtered or unexported fields
}

OverlayFSSyncher is a struct for OverlayFSSyncher

func NewOverlayFSSyncher added in v0.10.1

func NewOverlayFSSyncher(volumeID string, irodsConnInfo *IRODSFSConnectionInfo, upper string) (*OverlayFSSyncher, error)

NewOverlayFSSyncher creates a new OverlayFSSyncher

func (*OverlayFSSyncher) GetUpperLayerPath added in v0.10.1

func (syncher *OverlayFSSyncher) GetUpperLayerPath() string

GetUpperLayerPath returns upper layer path

func (*OverlayFSSyncher) Release added in v0.10.1

func (syncher *OverlayFSSyncher) Release()

func (*OverlayFSSyncher) Sync added in v0.10.1

func (syncher *OverlayFSSyncher) Sync() error

Sync syncs upper layer data to lower layer

type ParallelJob added in v0.10.1

type ParallelJob struct {
	// contains filtered or unexported fields
}

ParallelJob is a parallel job

func (*ParallelJob) GetManager added in v0.10.1

func (job *ParallelJob) GetManager() *ParallelJobManager

GetManager returns manager

type ParallelJobManager added in v0.10.1

type ParallelJobManager struct {
	// contains filtered or unexported fields
}

ParallelJobManager manages parallel jobs

func NewParallelJobManager added in v0.10.1

func NewParallelJobManager(maxThreads int) *ParallelJobManager

NewParallelJobManager creates a new ParallelJobManager

func (*ParallelJobManager) DoneScheduling added in v0.10.1

func (manager *ParallelJobManager) DoneScheduling()

DoneScheduling completes scheduling

func (*ParallelJobManager) Schedule added in v0.10.1

func (manager *ParallelJobManager) Schedule(name string, task ParallelJobTask, threadsRequired int) error

Schedule schedules a new task

func (*ParallelJobManager) ScheduleBarrier added in v0.10.1

func (manager *ParallelJobManager) ScheduleBarrier(name string) error

ScheduleBarrier schedules a new barrier task

func (*ParallelJobManager) Start added in v0.10.1

func (manager *ParallelJobManager) Start()

Start starts processing tasks

func (*ParallelJobManager) Wait added in v0.10.1

func (manager *ParallelJobManager) Wait() error

Wait waits for pending tasks

type ParallelJobTask added in v0.10.1

type ParallelJobTask func(job *ParallelJob) error

ParallelJobTask is a task function for a parallel job

Jump to

Keyboard shortcuts

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