client

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 15 Imported by: 12

Documentation

Index

Constants

View Source
const (
	MinimumBlockSize = 512  // This is the minimum value that works in practice, else the client stops with "invalid argument"
	MaximumBlockSize = 4096 // This is the maximum value that works in practice, else the client stops with "invalid argument"
)

Variables

View Source
var (
	ErrUnsupportedNetwork         = errors.New("unsupported network")
	ErrUnknownReply               = errors.New("unknown reply")
	ErrUnknownInfo                = errors.New("unknown info")
	ErrUnknownErr                 = errors.New("unknown error")
	ErrUnsupportedServerBlockSize = errors.New("server proposed unsupported block size")
	ErrMinimumBlockSize           = errors.New("block size below mimimum requested")
	ErrMaximumBlockSize           = errors.New("block size above maximum requested")
	ErrBlockSizeNotPowerOfTwo     = errors.New("block size is not a power of 2")
)

Functions

func Connect

func Connect(conn net.Conn, device *os.File, options *Options) error

func Disconnect

func Disconnect(device *os.File) error

func List

func List(conn net.Conn) ([]string, error)

Types

type Options

type Options struct {
	ExportName             string
	BlockSize              uint32
	OnConnected            func()
	ReadyCheckUdev         bool
	ReadyCheckPollInterval time.Duration
	Timeout                int
}

Jump to

Keyboard shortcuts

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