Releases: no-src/gofs
Releases · no-src/gofs
v0.5.1
Fixed
- Wait for the http server to start successfully in one second, and add some error logs.
Enhancements
- Add the
command
package to support executing a series of commands by a config file that defines some instructions. - Add some integration tests.
- Ensure all the code in the
runWithConfig
function is executed. - Replace the
WaitDone
withDone
to limit the behavior of the caller. - Support shutdown by caller, wait initial finished and wait for program exit.
- Add the
NotifySignal
type, sends a signal with timeout. - Update the
signal.Notify
function, support send a signal to trigger shutdown by user. - Add the test-coverage.sh script.
- Add the
NewHash
function to support return the hash implementation by the specified hash algorithm, and update theHashFromFile
,HashFromFileName
,Hash
,HashFromString
functions to support custom hash algorithm. - Add the
cmd.RunWithConfigFile
function. - Code refactoring, extract the interface
Done
. - Code refactoring, use the
Option
to pass parameter when creates the instance ofMonitor
. - Update README docs, add the usages of the
session_mode
andsession_connection
flags. - Update README docs, add the progress, encryption and decryption sections.
- Update run-gofs-docker-local-disk-with-decrypt.sh script, remove unnecessary parameters.
- Update dependency, github.com/minio/minio-go/v7 v7.0.42 => v7.0.44.
- Update dependency, github.com/no-src/log v0.1.8 => v0.1.9.
- Update dependency, github.com/schollz/progressbar/v3 v3.12.1 => v3.12.2.
v0.5.0
Fixed
- Fix renames a dir will not trigger the
Write
event on some Windows environments. - When remove or rename a file, remove the invalid file info.
- If the file exists in MinIO server, don't create the empty file.
- If login success, don't print the real password to the log.
- Fix use of insecure
HostKeyCallback
implementation by adding thessh_key
flag. - Fix adding a nil cookie to request will cause panic.
- Fix the data race in the
Conn
. - Fix the data race of the
closed
in thetcpServer
.
Enhancements
- Add the
fs.IsSub
function and tests. - Add the
encrypt
,encrypt_path
,encrypt_secret
,decrypt
,decrypt_path
,decrypt_secret
anddecrypt_out
flags to support encrypt and decrypt. - Add the
progress
flag to support print the sync progress. - Add the
sync_workers
flag to set the number of file sync workers. - Add the
log_split_date
flag to support split log file by date and update README docs. - Code refactoring, extracts
errNilTranConn
error and rename theerrNilConn
toerrNilNetConn
. - Code refactoring, replace the type embedding with field combination in the
tran.Conn
. - Code refactoring, use the
Option
to pass parameter when creates the instance ofSync
. - Rename the
minIOClient
tominIODriver
, and replace the type embedding with field combination in theminIODriver
. - Rename the
sftpClient
tosftpDriver
, and replace the type embedding with field combination in thesftpDriver
. - Update the examples about MinIO, add the
secure
parameter with the default value. - If the current path's parent directory is in the
writeMap
, then ignore the current path. - Reduce push the files that are not modified to server.
- Add some tests for the
util/httputil
package. - Add some tests for the
tran
package. - Update dependency, github.com/schollz/progressbar/v3 v3.11.0 => v3.12.1.
- Update dependency, github.com/minio/minio-go/v7 v7.0.37 => v7.0.42.
- Update dependency, github.com/fsnotify/fsnotify v1.5.4 => v1.6.0.
- Update dependency, github.com/no-src/log v0.1.7 => v0.1.8.
- Create codeql.yml.
- Remove the chat badge.
v0.4.4
Fixed
- Fix vulnerability
GO-2022-0969
. - Fix the random seed is not be reset.
- Fix compile error, syscall.Timespec's members are
int32
onlinux 386
. - Fix start file server failed may lose some error log.
Enhancements
- Add support golang 1.19.
- Add support to pull the files from the MinIO server or push the changed files to the MinIO server.
- Add the
commit
,current_time
,start_time
andup_time
fields for report api. - Mask the session connection of report api.
- Add support to specified the redis session secret in the redis connection string.
- Add support to pull the files from the sftp server.
- Update README docs, add the SFTP Client section.
- Add the SFTP client example scripts for docker.
- Update the
Driver
interface, add theWrite
function and update theCreate
function. - Add
DriverName
function to theDriver
interface. - Rename the struct
sftpClientSync
tosftpPushClientSync
. - Code refactoring, extract
driverPullClientMonitor
,driverPullClientSync
anddriverPushClientSync
structures. - Add the
Time.Sub
function and test. - Code refactoring, replace
chan bool
withchan struct{}
type if only to receive notification and don't care about the received value. - Move the function
fs.GetFileTime
tofs/fs.go
and add some function prototype. - Remove the
GinHandler
interface and update the dependencies. - Replace
ioutil.ReadAll
withio.ReadAll
. - Update dependency, github.com/gin-contrib/pprof v1.3.0 => v1.4.0.
- Update dependency, github.com/gin-contrib/gzip v0.0.5 => v0.0.6.
- Update dependency, github.com/no-src/log v0.1.4 => v0.1.7.
- Update dependency, github.com/minio/minio-go/v7 v7.0.34 => v7.0.37.
- Update dependency, golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e => v0.0.0-20220722155217-630584e8d5aa.
v0.4.3
Fixed
- Fix when create a directory that matches the ignore rule, then its subdirectory's file that does not match the ignore rule will miss synchronize.
Enhancements
- Add support to sync the changed file to the sftp server.
- Add support to browse files from sftp server by http.
- Use the
retry_*
flags to control sftp reconnect rule. - Update Dockerfile, set environment
CGO_ENABLED=0
to disable dynamically linked for run in Docker. - Remove the
-tags netgo
compile argument in thebuild-release.sh
script for release. - Add support
[filepath]
and[regexp]
switches to control the ignore file rule provider, default is[filepath]
. - Support imports the gofs as an importable package.
- Add the
RunWithArgs
function, running the gofs program with specified command-line arguments, starting with the program name. - Add the
VFS.Addr
function to return the server address. - Export the
fs.toDeletedPath
function. - Skip the access log of
/favicon.ico
path. - Add the
log_format
flag to set the log output format, current supporttext
andjson
, default istext
. - Update dependency and fix incompatible code, github.com/no-src/log v0.1.3 => v0.1.4.
- Update dependency, github.com/gin-gonic/gin v1.8.0 => v1.8.1.
- Update
build-docker.sh
script, remove the image with specified tag and remove dangling images after build success.
v0.4.2
Fixed
- Fix the program not exiting correctly when the file web server fails to start.
Enhancements
- Add the
tls_insecure_skip_verify
flag to control whether a client verifies the server's certificate chain and host name. - Add the
httputil.NewTLSConfig
function to reduce repeat code. - Update docker example scripts, add the
WORKDIR
environment variable and use theGOFS_SERVER_ADDR
environment variable as the host of the generate cert. - Add the
session_mode
andsession_connection
flags to support switching session store mode, currently supportsmemory[1]
andredis[2]
, default ismemory[1]
. - Add the
Run
function and keep themain
function clean. - Add more optional hash algorithms, and add the
checksum_algorithm
flag to set the default hash algorithm. - Update README docs, add
relay
section. - Update dependency, github.com/gin-gonic/gin v1.7.7 => v1.8.0.
- Add docker image repository address for the
about
flag.
v0.4.1
Enhancements
- Add the
Docker
support and some docker example scripts. - Add
build-release.sh
script to build release file for the linux and windows system. - Add support using the
v
flag print go version info. - Add
sync_delay flag
,sync_delay_events
andsync_delay_time
flags to support sync delay and update README docs. - Add the
log_sample_rate
flag to set the sample rate for the sample logger, and the value ranges from 0 to 1, default is1
. - Add the
force_checksum
flag, if the file size and file modification time of the source file is equal to the destination file andforce_checksum
isfalse
, then ignore the current file transfer. - Add
dependabot.yml
. - Update github action,codecov/codecov-action 2 => 3.
- Update github action,actions/setup-go 2 => 3.
- Update github action,actions/checkout 2 => 3.
- Update dependency, github.com/no-src/log v0.1.2 => v0.1.3.
- Update dependency, github.com/fsnotify/fsnotify v1.5.1 => v1.5.4.
- Update dependency, github.com/gin-contrib/sessions v0.0.4 => v0.0.5.
- Code refactoring for tests.
v0.4.0
Enhancements
- Changed minimum supported version to
go1.18
, removed thego1.17
support. - Add the
report
flag to support enable the report api route and start to collect the report data, need enablemanage
flag first. - Update
interface{}
type toany
. - Add the
TopList
struct and tests, store some elements in list with specified capacity, the oldest elements that exceed specified capacity will be discarded. - Add the
Time
struct and tests in theutil/timeutil
package. - Export the
event
struct and its fields, and add aTime
field for it. - Add benchmark tests for the
hashutil
package and move theTestHashValues
test to hash_value_test.go. - Add the
checkpoint_count
flag to use the file checkpoint to reduce transfer unmodified file chunks and update the README doc for it. - Add the
need_checkpoint
parameter to the file query api support to return file checkpoint hash value and update server/README.md doc for it. - Update dependency, github.com/no-src/log v0.1.1 => v0.1.2.
- Remove unused function
httputil.HttpPostFileWithCookie
. - Remove the
no_server
tags and no longer support to remove file server. - Add the
hashutil.CheckpointsMD5FromFileName
function and tests, calculate the hash value of the full file and first chunk and some checkpoints. - Add the
hashutil.CompareHashValuesWithFileName
function and tests, calculate the file hashes and return the last continuous hitHashValue
. - Add the
checksum
flag to calculate and print the checksum forsource
file.
v0.3.4
Fixed
- Fix cyclomatic complexity is too high.
Enhancements
- Add support
go1.18
. - Support send a request that compares the hash value of the file chunk before writing the file chunk to the remote push server.
- Add the
MD5FromFileChunk
function to calculate the hash value of the file chunk and add some tests for it. - Add the
IsEOF
andIsNonEOF
functions, and add some tests for them. - Move
util/*.go
to the*util
package and add some tests for this package. - Remove the
+build
instruction. - Remove the
vfsValue.Get
function. - Remove
break
in theswitch
. - Rename the
MD5
function toMD5FromString
. - Add some tests.
- Use the mock function for disk operation in the
fs
package tests. - Update
server/README.md
, fix table format and update file push api document.
v0.3.3
Fixed
- Fix the
EventLog
write to a nilWriter
will cause panic. - Fix the
DoWithContext
function will return a nil value when panic occurs. - Fix call the
Done
orDoneWithError
for more than once will be deadlock. - Fix the golint warning.
Enhancements
- Rename the
pprof
flag tomanage
. - Rename the
pprof_private
flag tomanage_private
. - Reduce upload and write the same file to the remote push server.
- Add the
conf
flag to load config from the file to replace the flags, supportyaml
andjson
format currently. - Add the
core.Duration
struct to replace thetime.Duration
and custom the encoding behavior. - Add config api to read program config with
json
oryaml
format. - Add the
awesome
badge. - Set the test timeout for 10 minutes.
- Add some tests.
- Update README docs, add the run in docker section, add usage for -chunk_size flag, and how to use the configuration file section.
- Update server/README.md, add document for file push api.
v0.3.2
Fixed
- Fix the cyclomatic complexity is too high.
- Fix creates too many simultaneously alive goroutines and they are exceeded.
- Fix writing an empty file has no effect in the remote disk mode and the push mode.
- Fix writing an empty file or a same length file has no effect in the local disk mode.
Enhancements
- Add the
chunk_size
flag to support upload the big file by chunk.