util

package
v0.5.10 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: BSD-3-Clause Imports: 8 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// TransferTaskMinLength is a minimum data length of a task for parallel data transfer
	TransferTaskMinLength int64 = 4 * 1024 * 1024 // 4MB
	// TransferTaskMaxNum is a maximum number of tasks for parallel data transfer
	TransferTaskMaxNum int = 4
	// TransferBlockSize is a block size of a task
	TransferBlockSize int64 = 1024 * 1024 // 1MB
)

Variables

This section is empty.

Functions

func GetBlockSizeForParallelTransfer added in v0.5.2

func GetBlockSizeForParallelTransfer(dataObjectLength int64) int64

GetBlockSizeForParallelTransfer returns the block size

func GetCorrectIRODSPath

func GetCorrectIRODSPath(p string) string

GetCorrectIRODSPath corrects the path

func GetIRODSDateTime

func GetIRODSDateTime(timestring string) (time.Time, error)

GetIRODSDateTime returns time struct from string IRODS time

func GetIRODSPathDirname

func GetIRODSPathDirname(p string) string

GetIRODSPathDirname returns the dir of the path

func GetIRODSPathFileName

func GetIRODSPathFileName(p string) string

GetIRODSPathFileName returns the filename of the path

func GetIRODSZone

func GetIRODSZone(p string) (string, error)

GetIRODSZone returns the zone of the path

func GetNumTasksForParallelTransfer added in v0.5.2

func GetNumTasksForParallelTransfer(dataObjectLength int64) int

GetNumTasksForParallelTransfer returns the number transfer tasks to be used

func MakeIRODSPath

func MakeIRODSPath(collectionPath string, dataobjectName string) string

MakeIRODSPath makes the path from collection and data object

func ReadBytes

func ReadBytes(socket net.Conn, buffer []byte, size int) (int, error)

ReadBytes reads data from socket in a particular size

func Scramble added in v0.4.4

func Scramble(in, key string) string

Scramble implements the obfEncodeByKey irods cpp function.

func SplitIRODSPath

func SplitIRODSPath(p string) (string, string)

SplitIRODSPath splits the path into dir and file

func WriteBytes

func WriteBytes(socket net.Conn, buffer []byte, size int) error

WriteBytes writes data to socket

Types

This section is empty.

Jump to

Keyboard shortcuts

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