Documentation ¶
Overview ¶
Package protocol implements the Block Exchange Protocol.
Index ¶
- Constants
- Variables
- func IsVersionMismatch(err error) bool
- func TotalInOut() (int64, int64)
- type BlockInfo
- func (b BlockInfo) IsEmpty() bool
- func (o BlockInfo) MarshalXDR() ([]byte, error)
- func (o BlockInfo) MarshalXDRInto(m *xdr.Marshaller) error
- func (o BlockInfo) MustMarshalXDR() []byte
- func (b BlockInfo) String() string
- func (o *BlockInfo) UnmarshalXDR(bs []byte) error
- func (o *BlockInfo) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o BlockInfo) XDRSize() int
- type CloseMessage
- func (o CloseMessage) MarshalXDR() ([]byte, error)
- func (o CloseMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o CloseMessage) MustMarshalXDR() []byte
- func (o *CloseMessage) UnmarshalXDR(bs []byte) error
- func (o *CloseMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o CloseMessage) XDRSize() int
- type ClusterConfigMessage
- func (o *ClusterConfigMessage) GetOption(key string) string
- func (o ClusterConfigMessage) MarshalXDR() ([]byte, error)
- func (o ClusterConfigMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o ClusterConfigMessage) MustMarshalXDR() []byte
- func (o *ClusterConfigMessage) UnmarshalXDR(bs []byte) error
- func (o *ClusterConfigMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o ClusterConfigMessage) XDRSize() int
- type Compression
- type Connection
- type Counter
- type Device
- type DeviceID
- type DownloadProgressMessage
- func (o DownloadProgressMessage) MarshalXDR() ([]byte, error)
- func (o DownloadProgressMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o DownloadProgressMessage) MustMarshalXDR() []byte
- func (o *DownloadProgressMessage) UnmarshalXDR(bs []byte) error
- func (o *DownloadProgressMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o DownloadProgressMessage) XDRSize() int
- type EmptyMessage
- func (o EmptyMessage) MarshalXDR() ([]byte, error)
- func (o EmptyMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o EmptyMessage) MustMarshalXDR() []byte
- func (o *EmptyMessage) UnmarshalXDR(bs []byte) error
- func (o *EmptyMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o EmptyMessage) XDRSize() int
- type FileDownloadProgressUpdate
- func (o FileDownloadProgressUpdate) MarshalXDR() ([]byte, error)
- func (o FileDownloadProgressUpdate) MarshalXDRInto(m *xdr.Marshaller) error
- func (o FileDownloadProgressUpdate) MustMarshalXDR() []byte
- func (o *FileDownloadProgressUpdate) UnmarshalXDR(bs []byte) error
- func (o *FileDownloadProgressUpdate) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o FileDownloadProgressUpdate) XDRSize() int
- type FileInfo
- func (f FileInfo) HasPermissionBits() bool
- func (f FileInfo) IsDeleted() bool
- func (f FileInfo) IsDirectory() bool
- func (f FileInfo) IsInvalid() bool
- func (f FileInfo) IsSymlink() bool
- func (o FileInfo) MarshalXDR() ([]byte, error)
- func (o FileInfo) MarshalXDRInto(m *xdr.Marshaller) error
- func (o FileInfo) MustMarshalXDR() []byte
- func (f FileInfo) Size() (bytes int64)
- func (f FileInfo) String() string
- func (o *FileInfo) UnmarshalXDR(bs []byte) error
- func (o *FileInfo) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (f FileInfo) WinsConflict(other FileInfo) bool
- func (o FileInfo) XDRSize() int
- type Folder
- type HelloMessage
- type HelloResult
- type IndexMessage
- func (o IndexMessage) MarshalXDR() ([]byte, error)
- func (o IndexMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o IndexMessage) MustMarshalXDR() []byte
- func (o *IndexMessage) UnmarshalXDR(bs []byte) error
- func (o *IndexMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o IndexMessage) XDRSize() int
- type Model
- type Option
- type Ordering
- type RequestMessage
- func (o RequestMessage) MarshalXDR() ([]byte, error)
- func (o RequestMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o RequestMessage) MustMarshalXDR() []byte
- func (o *RequestMessage) UnmarshalXDR(bs []byte) error
- func (o *RequestMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o RequestMessage) XDRSize() int
- type ResponseMessage
- func (o ResponseMessage) MarshalXDR() ([]byte, error)
- func (o ResponseMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o ResponseMessage) MustMarshalXDR() []byte
- func (o *ResponseMessage) UnmarshalXDR(bs []byte) error
- func (o *ResponseMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o ResponseMessage) XDRSize() int
- type ShortID
- type Statistics
- type Vector
- func (a Vector) Compare(b Vector) Ordering
- func (v Vector) Concurrent(b Vector) bool
- func (v Vector) Copy() Vector
- func (v Vector) Counter(id ShortID) uint64
- func (v Vector) Equal(b Vector) bool
- func (v Vector) GreaterEqual(b Vector) bool
- func (v Vector) LesserEqual(b Vector) bool
- func (v Vector) MarshalXDRInto(m *xdr.Marshaller) error
- func (v Vector) Merge(b Vector) Vector
- func (v *Vector) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (v Vector) Update(id ShortID) Vector
- func (v Vector) XDRSize() int
- type Version13HelloMessage
- func (m Version13HelloMessage) Magic() uint32
- func (m Version13HelloMessage) Marshal() ([]byte, error)
- func (o Version13HelloMessage) MarshalXDR() ([]byte, error)
- func (o Version13HelloMessage) MarshalXDRInto(m *xdr.Marshaller) error
- func (o Version13HelloMessage) MustMarshalXDR() []byte
- func (o *Version13HelloMessage) UnmarshalXDR(bs []byte) error
- func (o *Version13HelloMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
- func (o Version13HelloMessage) XDRSize() int
Constants ¶
const ( // BlockSize is the standard ata block size (128 KiB) BlockSize = 128 << 10 // MaxMessageLen is the largest message size allowed on the wire. (512 MiB) MaxMessageLen = 64 << 23 )
const ( FlagDeleted uint32 = 1 << 12 // bit 19 in MSB order with the first bit being #0 FlagInvalid = 1 << 13 // bit 18 FlagDirectory = 1 << 14 // bit 17 FlagNoPermBits = 1 << 15 // bit 16 FlagSymlink = 1 << 16 // bit 15 FlagSymlinkMissingTarget = 1 << 17 // bit 14 FlagsAll = (1 << 18) - 1 SymlinkTypeMask = FlagDirectory | FlagSymlinkMissingTarget )
FileInfo flags
const ( UpdateTypeAppend uint32 = iota UpdateTypeForget )
FileDownloadProgressUpdate update types
const ( FlagFolderReadOnly uint32 = 1 << 0 FlagFolderIgnorePerms = 1 << 1 FlagFolderIgnoreDelete = 1 << 2 FlagFolderDisabledTempIndexes = 1 << 3 FlagFolderAll = 1<<4 - 1 )
ClusterConfigMessage.Folders flags
const ( FlagIntroducer = 1 << 2 )
ClusterConfigMessage.Folders.Devices flags
const ( // PingSendInterval is how often we make sure to send a message, by // triggering pings if necessary. PingSendInterval = 90 * time.Second // ReceiveTimeout is the longest we'll wait for a message from the other // side before closing the connection. ReceiveTimeout = 300 * time.Second )
const (
FlagFromTemporary uint32 = 1 << iota
)
Request message flags
Variables ¶
var ( ErrNoError error ErrGeneric = errors.New("generic error") ErrNoSuchFile = errors.New("no such file") ErrInvalid = errors.New("file is invalid") )
var ( // ErrTooOldVersion12 is returned by ExchangeHello when the other side // speaks the older, incompatible version 0.12 of the protocol. ErrTooOldVersion12 = errors.New("the remote device speaks an older version of the protocol (v0.12) not compatible with this version") // ErrUnknownMagic is returned by ExchangeHellow when the other side // speaks something entirely unknown. ErrUnknownMagic = errors.New("the remote device speaks an unknown (newer?) version of the protocol") )
var ( ErrClosed = errors.New("connection closed") ErrTimeout = errors.New("read timeout") ErrSwitchingConnections = errors.New("switching connections") )
var LocalDeviceID = DeviceID{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
var (
Version13HelloMagic uint32 = 0x9F79BC40
)
Functions ¶
func IsVersionMismatch ¶ added in v0.13.6
IsVersionMismatch returns true if the error is a reliable indication of a version mismatch that we might want to alert the user about.
func TotalInOut ¶
Types ¶
type BlockInfo ¶
func (BlockInfo) IsEmpty ¶ added in v0.12.4
IsEmpty returns true if the block is a full block of zeroes.
func (BlockInfo) MarshalXDR ¶
func (BlockInfo) MarshalXDRInto ¶ added in v0.13.0
func (o BlockInfo) MarshalXDRInto(m *xdr.Marshaller) error
func (BlockInfo) MustMarshalXDR ¶
func (*BlockInfo) UnmarshalXDR ¶
func (*BlockInfo) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *BlockInfo) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type CloseMessage ¶
func (CloseMessage) MarshalXDR ¶
func (o CloseMessage) MarshalXDR() ([]byte, error)
func (CloseMessage) MarshalXDRInto ¶ added in v0.13.0
func (o CloseMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (CloseMessage) MustMarshalXDR ¶
func (o CloseMessage) MustMarshalXDR() []byte
func (*CloseMessage) UnmarshalXDR ¶
func (o *CloseMessage) UnmarshalXDR(bs []byte) error
func (*CloseMessage) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *CloseMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (CloseMessage) XDRSize ¶ added in v0.13.0
func (o CloseMessage) XDRSize() int
type ClusterConfigMessage ¶
func (*ClusterConfigMessage) GetOption ¶
func (o *ClusterConfigMessage) GetOption(key string) string
func (ClusterConfigMessage) MarshalXDR ¶
func (o ClusterConfigMessage) MarshalXDR() ([]byte, error)
func (ClusterConfigMessage) MarshalXDRInto ¶ added in v0.13.0
func (o ClusterConfigMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (ClusterConfigMessage) MustMarshalXDR ¶
func (o ClusterConfigMessage) MustMarshalXDR() []byte
func (*ClusterConfigMessage) UnmarshalXDR ¶
func (o *ClusterConfigMessage) UnmarshalXDR(bs []byte) error
func (*ClusterConfigMessage) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *ClusterConfigMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (ClusterConfigMessage) XDRSize ¶ added in v0.13.0
func (o ClusterConfigMessage) XDRSize() int
type Compression ¶
type Compression int
const ( CompressMetadata Compression = iota // zero value is the default, default should be "metadata" CompressNever CompressAlways )
func (Compression) GoString ¶
func (c Compression) GoString() string
func (Compression) MarshalText ¶
func (c Compression) MarshalText() ([]byte, error)
func (Compression) String ¶
func (c Compression) String() string
func (*Compression) UnmarshalText ¶
func (c *Compression) UnmarshalText(bs []byte) error
type Connection ¶
type Connection interface { Start() ID() DeviceID Name() string Index(folder string, files []FileInfo, flags uint32, options []Option) error IndexUpdate(folder string, files []FileInfo, flags uint32, options []Option) error Request(folder string, name string, offset int64, size int, hash []byte, fromTemporary bool) ([]byte, error) ClusterConfig(config ClusterConfigMessage) DownloadProgress(folder string, updates []FileDownloadProgressUpdate, flags uint32, options []Option) Statistics() Statistics Closed() bool }
func NewConnection ¶
func NewConnection(deviceID DeviceID, reader io.Reader, writer io.Writer, receiver Model, name string, compress Compression) Connection
type Device ¶
type Device struct { ID []byte // max:32 Name string // max:64 Addresses []string // max:64,2083 Compression uint32 CertName string // max:64 MaxLocalVersion int64 Flags uint32 Options []Option // max:64 }
func (Device) MarshalXDR ¶
func (Device) MarshalXDRInto ¶ added in v0.13.0
func (o Device) MarshalXDRInto(m *xdr.Marshaller) error
func (Device) MustMarshalXDR ¶
func (*Device) UnmarshalXDR ¶
func (*Device) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *Device) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type DeviceID ¶
type DeviceID [32]byte
func DeviceIDFromBytes ¶
func DeviceIDFromString ¶
func NewDeviceID ¶
NewDeviceID generates a new device ID from the raw bytes of a certificate
func (*DeviceID) MarshalText ¶
func (*DeviceID) UnmarshalText ¶
type DownloadProgressMessage ¶ added in v0.13.0
type DownloadProgressMessage struct { Folder string // max:64 Updates []FileDownloadProgressUpdate // max:1000000 Flags uint32 Options []Option // max:64 }
func (DownloadProgressMessage) MarshalXDR ¶ added in v0.13.0
func (o DownloadProgressMessage) MarshalXDR() ([]byte, error)
func (DownloadProgressMessage) MarshalXDRInto ¶ added in v0.13.0
func (o DownloadProgressMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (DownloadProgressMessage) MustMarshalXDR ¶ added in v0.13.0
func (o DownloadProgressMessage) MustMarshalXDR() []byte
func (*DownloadProgressMessage) UnmarshalXDR ¶ added in v0.13.0
func (o *DownloadProgressMessage) UnmarshalXDR(bs []byte) error
func (*DownloadProgressMessage) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *DownloadProgressMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (DownloadProgressMessage) XDRSize ¶ added in v0.13.0
func (o DownloadProgressMessage) XDRSize() int
type EmptyMessage ¶
type EmptyMessage struct{}
func (EmptyMessage) MarshalXDR ¶
func (o EmptyMessage) MarshalXDR() ([]byte, error)
func (EmptyMessage) MarshalXDRInto ¶ added in v0.13.0
func (o EmptyMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (EmptyMessage) MustMarshalXDR ¶
func (o EmptyMessage) MustMarshalXDR() []byte
func (*EmptyMessage) UnmarshalXDR ¶
func (o *EmptyMessage) UnmarshalXDR(bs []byte) error
func (*EmptyMessage) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *EmptyMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (EmptyMessage) XDRSize ¶ added in v0.13.0
func (o EmptyMessage) XDRSize() int
type FileDownloadProgressUpdate ¶ added in v0.13.0
type FileDownloadProgressUpdate struct { UpdateType uint32 Name string // max:8192 Version Vector BlockIndexes []int32 // max:1000000 }
func (FileDownloadProgressUpdate) MarshalXDR ¶ added in v0.13.0
func (o FileDownloadProgressUpdate) MarshalXDR() ([]byte, error)
func (FileDownloadProgressUpdate) MarshalXDRInto ¶ added in v0.13.0
func (o FileDownloadProgressUpdate) MarshalXDRInto(m *xdr.Marshaller) error
func (FileDownloadProgressUpdate) MustMarshalXDR ¶ added in v0.13.0
func (o FileDownloadProgressUpdate) MustMarshalXDR() []byte
func (*FileDownloadProgressUpdate) UnmarshalXDR ¶ added in v0.13.0
func (o *FileDownloadProgressUpdate) UnmarshalXDR(bs []byte) error
func (*FileDownloadProgressUpdate) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *FileDownloadProgressUpdate) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (FileDownloadProgressUpdate) XDRSize ¶ added in v0.13.0
func (o FileDownloadProgressUpdate) XDRSize() int
type FileInfo ¶
type FileInfo struct { Name string // max:8192 Flags uint32 Modified int64 Version Vector LocalVersion int64 CachedSize int64 // noencode (cache only) Blocks []BlockInfo // max:10000000 }
func (FileInfo) HasPermissionBits ¶
func (FileInfo) IsDirectory ¶
func (FileInfo) MarshalXDR ¶
func (FileInfo) MarshalXDRInto ¶ added in v0.13.0
func (o FileInfo) MarshalXDRInto(m *xdr.Marshaller) error
func (FileInfo) MustMarshalXDR ¶
func (*FileInfo) UnmarshalXDR ¶
func (*FileInfo) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *FileInfo) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (FileInfo) WinsConflict ¶
WinsConflict returns true if "f" is the one to choose when it is in conflict with "other".
type Folder ¶
type Folder struct { ID string // max:256 Label string // max:256 Devices []Device // max:1000000 Flags uint32 Options []Option // max:64 }
func (Folder) MarshalXDR ¶
func (Folder) MarshalXDRInto ¶ added in v0.13.0
func (o Folder) MarshalXDRInto(m *xdr.Marshaller) error
func (Folder) MustMarshalXDR ¶
func (*Folder) UnmarshalXDR ¶
func (*Folder) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *Folder) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type HelloMessage ¶ added in v0.13.0
The HelloMessage interface is implemented by the version specific hello message. It knows its magic number and how to serialize itself to a byte buffer.
type HelloResult ¶ added in v0.13.6
The HelloResult is the non version specific interpretation of the other side's Hello message.
func ExchangeHello ¶ added in v0.13.6
func ExchangeHello(c io.ReadWriter, h HelloMessage) (HelloResult, error)
type IndexMessage ¶
type IndexMessage struct { Folder string // max:256 Files []FileInfo // max:1000000 Flags uint32 Options []Option // max:64 }
func (IndexMessage) MarshalXDR ¶
func (o IndexMessage) MarshalXDR() ([]byte, error)
func (IndexMessage) MarshalXDRInto ¶ added in v0.13.0
func (o IndexMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (IndexMessage) MustMarshalXDR ¶
func (o IndexMessage) MustMarshalXDR() []byte
func (*IndexMessage) UnmarshalXDR ¶
func (o *IndexMessage) UnmarshalXDR(bs []byte) error
func (*IndexMessage) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *IndexMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (IndexMessage) XDRSize ¶ added in v0.13.0
func (o IndexMessage) XDRSize() int
type Model ¶
type Model interface { // An index was received from the peer device Index(deviceID DeviceID, folder string, files []FileInfo, flags uint32, options []Option) // An index update was received from the peer device IndexUpdate(deviceID DeviceID, folder string, files []FileInfo, flags uint32, options []Option) // A request was made by the peer device Request(deviceID DeviceID, folder string, name string, offset int64, hash []byte, flags uint32, options []Option, buf []byte) error // A cluster configuration message was received ClusterConfig(deviceID DeviceID, config ClusterConfigMessage) // The peer device closed the connection Close(deviceID DeviceID, err error) // The peer device sent progress updates for the files it is currently downloading DownloadProgress(deviceID DeviceID, folder string, updates []FileDownloadProgressUpdate, flags uint32, options []Option) }
type Option ¶
func (Option) MarshalXDR ¶
func (Option) MarshalXDRInto ¶ added in v0.13.0
func (o Option) MarshalXDRInto(m *xdr.Marshaller) error
func (Option) MustMarshalXDR ¶
func (*Option) UnmarshalXDR ¶
func (*Option) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *Option) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type RequestMessage ¶
type RequestMessage struct { Folder string // max:256 Name string // max:8192 Offset int64 Size int32 Hash []byte // max:64 Flags uint32 Options []Option // max:64 }
func (RequestMessage) MarshalXDR ¶
func (o RequestMessage) MarshalXDR() ([]byte, error)
func (RequestMessage) MarshalXDRInto ¶ added in v0.13.0
func (o RequestMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (RequestMessage) MustMarshalXDR ¶
func (o RequestMessage) MustMarshalXDR() []byte
func (*RequestMessage) UnmarshalXDR ¶
func (o *RequestMessage) UnmarshalXDR(bs []byte) error
func (*RequestMessage) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *RequestMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (RequestMessage) XDRSize ¶ added in v0.13.0
func (o RequestMessage) XDRSize() int
type ResponseMessage ¶
func (ResponseMessage) MarshalXDR ¶
func (o ResponseMessage) MarshalXDR() ([]byte, error)
func (ResponseMessage) MarshalXDRInto ¶ added in v0.13.0
func (o ResponseMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (ResponseMessage) MustMarshalXDR ¶
func (o ResponseMessage) MustMarshalXDR() []byte
func (*ResponseMessage) UnmarshalXDR ¶
func (o *ResponseMessage) UnmarshalXDR(bs []byte) error
func (*ResponseMessage) UnmarshalXDRFrom ¶ added in v0.13.0
func (o *ResponseMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (ResponseMessage) XDRSize ¶ added in v0.13.0
func (o ResponseMessage) XDRSize() int
type Vector ¶
type Vector []Counter
The Vector type represents a version vector. The zero value is a usable version vector. The vector has slice semantics and some operations on it are "append-like" in that they may return the same vector modified, or v new allocated Vector with the modified contents.
func (Vector) Concurrent ¶
Concurrent returns true when the two vectors are concurrent.
func (Vector) GreaterEqual ¶
GreaterEqual returns true when the two vectors are equivalent or v is Greater than b.
func (Vector) LesserEqual ¶
LesserEqual returns true when the two vectors are equivalent or v is Lesser than b.
func (Vector) MarshalXDRInto ¶ added in v0.13.0
func (v Vector) MarshalXDRInto(m *xdr.Marshaller) error
func (Vector) Merge ¶
Merge returns the vector containing the maximum indexes from v and b. If it is possible, the vector v is updated and returned. If it is not, a copy will be created, updated and returned.
func (*Vector) UnmarshalXDRFrom ¶ added in v0.13.0
func (v *Vector) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
type Version13HelloMessage ¶ added in v0.13.6
type Version13HelloMessage struct { DeviceName string // max:64 ClientName string // max:64 ClientVersion string // max:64 }
func (Version13HelloMessage) Magic ¶ added in v0.13.6
func (m Version13HelloMessage) Magic() uint32
func (Version13HelloMessage) Marshal ¶ added in v0.13.6
func (m Version13HelloMessage) Marshal() ([]byte, error)
func (Version13HelloMessage) MarshalXDR ¶ added in v0.13.6
func (o Version13HelloMessage) MarshalXDR() ([]byte, error)
func (Version13HelloMessage) MarshalXDRInto ¶ added in v0.13.6
func (o Version13HelloMessage) MarshalXDRInto(m *xdr.Marshaller) error
func (Version13HelloMessage) MustMarshalXDR ¶ added in v0.13.6
func (o Version13HelloMessage) MustMarshalXDR() []byte
func (*Version13HelloMessage) UnmarshalXDR ¶ added in v0.13.6
func (o *Version13HelloMessage) UnmarshalXDR(bs []byte) error
func (*Version13HelloMessage) UnmarshalXDRFrom ¶ added in v0.13.6
func (o *Version13HelloMessage) UnmarshalXDRFrom(u *xdr.Unmarshaller) error
func (Version13HelloMessage) XDRSize ¶ added in v0.13.6
func (o Version13HelloMessage) XDRSize() int