Documentation
¶
Index ¶
- Constants
- Variables
- func CheckFuse(checkFusermount bool) error
- func CorrectSystemUser(username string, uid int, gid int) (string, int, int, error)
- func GetClientVersion() string
- func GetDefaultDataRootDirPath() string
- func GetDefaultIRODSConfigPath() string
- func GetDefaultInstanceID() string
- func GetVersionJSON() (string, error)
- func GetVersionParts(version string) (int, int, int)
- func Input(msg string) string
- func InputPassword(msg string) string
- func IsNewerVersion(ver1 []int, ver2 []int) bool
- func ParsePoolServiceEndpoint(endpoint string) (string, string, error)
- func UnmountFuse(mountPoint string) error
- type Config
- func NewConfigFromFile(config *Config, filePath string) (*Config, error)
- func NewConfigFromICommandsEnvDir(config *Config, dirPath string) (*Config, error)
- func NewConfigFromJSON(config *Config, jsonBytes []byte) (*Config, error)
- func NewConfigFromJSONFile(config *Config, jsonPath string) (*Config, error)
- func NewConfigFromStdin(config *Config, bytes []byte) (*Config, error)
- func NewConfigFromYAML(config *Config, yamlBytes []byte) (*Config, error)
- func NewConfigFromYAMLFile(config *Config, yamlPath string) (*Config, error)
- func NewDefaultConfig() *Config
- func (config *Config) FixPathMappings()
- func (config *Config) FixSystemUserConfiguration() error
- func (config *Config) FromIRODSUrl(inputURL string) error
- func (config *Config) GetDataRootPath() string
- func (config *Config) GetLogFilePath() string
- func (config *Config) GetLogWriter(foregroundProcess bool) (io.WriteCloser, error)
- func (config *Config) MakeLogDir() error
- func (config *Config) MakeWorkDirs() error
- func (config *Config) Validate() error
- type DataFormat
- type IRODSAccessURL
- type MultiWriteCloser
- type VersionInfo
Constants ¶
const ( DataRootPathFallback string = "/var/lib/irodsfs" ReadAheadMaxDefault int = 1024 * 128 // 128KB ReadWriteMaxDefault int = 1 * 1024 * 1024 // 1MB // not in-use FilesystemTimeout time.Duration = 10 * time.Minute TCPBufferSizeDefault int = 4 * 1024 * 1024 // 4MB TCPBufferSizeStringDefault string = "4MB" ConnectionMaxDefault int = 10 ClientProgramName string = "irodsfs" FuseFSName string = "irodsfs" )
Variables ¶
var ErrFuseInstallationError = errors.New("fuse is not installed")
Functions ¶
func CorrectSystemUser ¶ added in v0.13.0
CorrectSystemUser returns username, uid, gid of the resolved system user. If nothing is specified, falls back to the current process user.
func GetClientVersion ¶
func GetClientVersion() string
GetClientVersion returns client version in string
func GetDefaultDataRootDirPath ¶ added in v0.8.0
func GetDefaultDataRootDirPath() string
GetDefaultDataRootDirPath returns default data root path
func GetDefaultIRODSConfigPath ¶ added in v0.10.1
func GetDefaultIRODSConfigPath() string
GetDefaultIRODSConfigPath returns default config path
func GetDefaultInstanceID ¶ added in v0.8.4
func GetDefaultInstanceID() string
GetDefaultInstanceID returns default instance id
func GetVersionJSON ¶
GetVersionJSON returns VersionInfo object in JSON string
func GetVersionParts ¶ added in v0.10.1
GetVersionParts returns version parts (major, minor, patch)
func InputPassword ¶ added in v0.10.3
func IsNewerVersion ¶ added in v0.10.1
IsNewerVersion compares ver1 against ver2
func ParsePoolServiceEndpoint ¶ added in v0.7.3
ParsePoolServiceEndpoint parses endpoint string
func UnmountFuse ¶
UnmountFuse lazily unmounts mountPoint using fusermount3 or fusermount.
Types ¶
type Config ¶
type Config struct {
irodsclient_config.Config // irods config
MountPath string `json:"mount_path,omitempty" yaml:"mount_path,omitempty"`
DataRootPath string `json:"data_root_path,omitempty" yaml:"data_root_path,omitempty"`
PathMappings []vpath.VPathMapping `json:"path_mappings,omitempty" yaml:"path_mappings,omitempty"`
ReadAheadMax int `json:"read_ahead_max,omitempty" yaml:"read_ahead_max,omitempty"`
ReadWriteMax int `json:"read_write_max,omitempty" yaml:"read_write_max,omitempty"`
Readonly bool `json:"readonly,omitempty" yaml:"readonly,omitempty"`
FuseOptions []string `json:"fuse_options,omitempty" yaml:"fuse_options,omitempty"`
UID int `json:"uid,omitempty" yaml:"uid,omitempty"`
GID int `json:"gid,omitempty" yaml:"gid,omitempty"`
SystemUser string `json:"system_user,omitempty" yaml:"system_user,omitempty"`
MetadataConnection irodsclient_fs.ConnectionConfig `json:"metadata_connection,omitempty" yaml:"metadata_connection,omitempty"`
IOConnection irodsclient_fs.ConnectionConfig `json:"io_connection,omitempty" yaml:"io_connection,omitempty"`
Cache irodsclient_fs.CacheConfig `json:"cache,omitempty" yaml:"cache,omitempty"`
PoolEndpoint string `json:"pool_endpoint,omitempty" yaml:"pool_endpoint,omitempty"`
Foreground bool `json:"foreground,omitempty" yaml:"foreground,omitempty"`
Debug bool `json:"debug,omitempty" yaml:"debug,omitempty"`
InstanceID string `json:"instanceid,omitempty" yaml:"instanceid,omitempty"`
LogPath string `json:"log_path,omitempty" yaml:"log_path,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
}
Config holds the parameters list which can be configured
func NewConfigFromFile ¶ added in v0.10.1
NewConfigFromFile creates Config from file
func NewConfigFromICommandsEnvDir ¶ added in v0.10.1
NewConfigFromICommandsEnvDir creates Config from icommands environment dir (e.g., ~/.irods)
func NewConfigFromJSON ¶ added in v0.13.0
NewConfigFromJSON creates Config from JSON
func NewConfigFromJSONFile ¶ added in v0.10.1
NewConfigFromJSONFile creates Config from JSON
func NewConfigFromStdin ¶ added in v0.13.0
func NewConfigFromYAML ¶
NewConfigFromYAML creates Config from YAML
func NewConfigFromYAMLFile ¶ added in v0.10.1
NewConfigFromYAMLFile creates Config from YAML
func (*Config) FixPathMappings ¶ added in v0.10.1
func (config *Config) FixPathMappings()
FixPathMappings fixes path mappings
func (*Config) FixSystemUserConfiguration ¶ added in v0.10.5
FixSystemUserConfiguration fixes system user configuration
func (*Config) FromIRODSUrl ¶ added in v0.10.1
FromIRODSUrl reads info from inputURL and updates config
func (*Config) GetDataRootPath ¶ added in v0.13.0
func (*Config) GetLogFilePath ¶ added in v0.8.0
GetLogFilePath returns log file path
func (*Config) GetLogWriter ¶ added in v0.13.0
func (config *Config) GetLogWriter(foregroundProcess bool) (io.WriteCloser, error)
func (*Config) MakeLogDir ¶ added in v0.8.0
MakeLogDir makes a log dir required
func (*Config) MakeWorkDirs ¶ added in v0.8.0
MakeWorkDirs makes dirs required
type DataFormat ¶ added in v0.13.0
type DataFormat string
const ( FormatJSON DataFormat = "JSON" FormatYAML DataFormat = "YAML" FormatUnknown DataFormat = "Unknown" )
func DetectFormat ¶ added in v0.13.0
func DetectFormat(data []byte) DataFormat
DetectFormat checks format
type IRODSAccessURL ¶ added in v0.10.1
type IRODSAccessURL struct {
User string
Password string
Host string
Port int
Zone string
Path string
}
IRODSAccessURL holds iRODS connection details parsed from an irods:// URL
func ParseIRODSUrl ¶ added in v0.10.1
func ParseIRODSUrl(inputURL string) (*IRODSAccessURL, error)
ParseIRODSUrl parses an irods:// URL and returns an IRODSAccessURL
type MultiWriteCloser ¶ added in v0.13.0
type MultiWriteCloser struct {
// contains filtered or unexported fields
}
MultiWriteCloser writes to multiple writers and closes the ones that implement io.Closer.
func NewMultiWriteCloser ¶ added in v0.13.0
func NewMultiWriteCloser(writers ...io.Writer) *MultiWriteCloser
func (*MultiWriteCloser) Close ¶ added in v0.13.0
func (mw *MultiWriteCloser) Close() error
type VersionInfo ¶
type VersionInfo struct {
ClientVersion string `json:"clientVersion"`
GitCommit string `json:"gitCommit"`
BuildDate string `json:"buildDate"`
GoVersion string `json:"goVersion"`
Compiler string `json:"compiler"`
Platform string `json:"platform"`
}
VersionInfo object contains version related info