Package AWS

Add feature to change http timeout directly in httpcli store in aws client
  Add copy/MPUCopy function
  Update mpu to allow copy with MPU

Package Cobra
  Fix println by fmt.Fprint to os.stdout

Package Crypt
  Refactor package to use instance of crypt instead of a global crypt unique instance
  Allow to gen key/nonce
  Add io stream reader/writer instead of only buffer slice encoder decoder

Package file/bandwidth
  Add new subpackage bandwith to limit a amount of byte read/write for a duraction
  Use file/progress function increment/reset
  Allow to add custom function increment / reset

Package IOUtils
  Remove useless file error.go, tempFile.go (replaced by package file)
  Move fileDescriptor to a subpackage fileDescriptor: allow to change nb of FD for linux/windows os
  Move Buffer ReadCloser to a new subpackage: allow to add close function to buffer, and expose read / write io interface
  Add sub package multiplexer to allow send/receive multiple io stream into on io stream

Package Socket
  Rework to expose io stream instead of buffer
  Fix minor bugs

Other:
  Bump dependencies
  Update code following bump dependencies
This commit is contained in:
Nicolas JUHEL
2023-10-03 10:18:19 +02:00
parent aed9d98203
commit b0fd08792c
61 changed files with 1612 additions and 753 deletions

View File

@@ -42,20 +42,20 @@ import (
scksrx "github.com/nabbar/golib/socket/server/unix"
)
func New(handler libsck.Handler, proto libptc.NetworkProtocol, sizeBufferRead, sizeBufferWrite int32, address string, perm os.FileMode) (libsck.Server, error) {
func New(handler libsck.Handler, proto libptc.NetworkProtocol, sizeBufferRead int32, address string, perm os.FileMode) (libsck.Server, error) {
switch proto {
case libptc.NetworkUnix:
if strings.EqualFold(runtime.GOOS, "linux") {
s := scksrx.New(handler, sizeBufferRead, sizeBufferWrite)
s := scksrx.New(handler, sizeBufferRead)
s.RegisterSocket(address, perm)
return s, nil
}
case libptc.NetworkTCP, libptc.NetworkTCP4, libptc.NetworkTCP6:
s := scksrt.New(handler, sizeBufferRead, sizeBufferWrite)
s := scksrt.New(handler, sizeBufferRead)
e := s.RegisterServer(address)
return s, e
case libptc.NetworkUDP, libptc.NetworkUDP4, libptc.NetworkUDP6:
s := scksru.New(handler, sizeBufferRead, sizeBufferWrite)
s := scksru.New(handler, sizeBufferRead)
e := s.RegisterServer(address)
return s, e
}