Versions in this module Expand all Collapse all v0 v0.0.4 Feb 6, 2022 Changes in this version + func MakeLogWriter(printMsg bool, logFile string) io.Writer + func Receive(ctx context.Context, port int, cryptoKey []byte, ...) error + func Send(addr, k string, v, cryptoKey []byte, config ...*Configuration) error + func SendString(addr, k, v string, cryptoKey []byte, config ...*Configuration) error + type Compression interface + Compress func(data []byte) ([]byte, error) + Uncompress func(comp []byte) ([]byte, error) + type Configuration struct + Cipher SymmetricCipher + Compressor Compression + LogWriter io.Writer + PacketPayloadSize int + PacketSizeLimit int + ReplyTimeout time.Duration + SendBufferSize int + SendPacketInterval time.Duration + SendRetries int + SendRetryInterval time.Duration + SendWaitInterval time.Duration + VerboseReceiver bool + VerboseSender bool + WriteTimeout time.Duration + func NewDebugConfig(logWriter ...io.Writer) *Configuration + func NewDefaultConfig() *Configuration + func (cf *Configuration) Validate() error + type Receiver struct + Config *Configuration + CryptoKey []byte + Port int + Receive func(k string, v []byte) error + func (rc *Receiver) Run() error + func (rc *Receiver) Stop() + type Sender struct + Address string + Config *Configuration + CryptoKey []byte + func (sd *Sender) AverageResponseMs() float64 + func (sd *Sender) DeliveredAllParts() bool + func (sd *Sender) LogStats(w ...io.Writer) + func (sd *Sender) Send(k string, v []byte) error + func (sd *Sender) SendString(k string, v string) error + func (sd *Sender) TransferSpeedKBpS() float64 + type SymmetricCipher interface + Decrypt func(ciphertext []byte) (plaintext []byte, err error) + Encrypt func(plaintext []byte) (ciphertext []byte, err error) + SetKey func(cryptoKey []byte) error + ValidateKey func(cryptoKey []byte) error