Documentation ¶
Overview ¶
Package fsutil is a generated protocol buffer package.
It is generated from these files:
stat.proto wire.proto
It has these top-level messages:
Stat Packet
Index ¶
- Variables
- func Changes(ctx context.Context, a, b walkerFn, changeFn ChangeFunc) error
- func ComparePath(p1, p2 string) int
- func GetWalkerFn(root string) walkerFn
- func NewTarsumHash(p string, fi os.FileInfo) (hash.Hash, error)
- func Receive(ctx context.Context, conn Stream, dest string, notifyHashed ChangeFunc) error
- func Send(ctx context.Context, conn Stream, root string, opt *WalkOpt, ...) error
- func Walk(ctx context.Context, p string, opt *WalkOpt, fn filepath.WalkFunc) error
- type ChangeFunc
- type ChangeKind
- type DiskWriter
- type DiskWriterOpt
- type HandleChangeFn
- type Hardlinks
- type Packet
- func (*Packet) Descriptor() ([]byte, []int)
- func (this *Packet) Equal(that interface{}) bool
- func (m *Packet) GetData() []byte
- func (m *Packet) GetID() uint32
- func (m *Packet) GetStat() *Stat
- func (m *Packet) GetType() Packet_PacketType
- func (this *Packet) GoString() string
- func (m *Packet) Marshal() (dAtA []byte, err error)
- func (m *Packet) MarshalTo(dAtA []byte) (int, error)
- func (*Packet) ProtoMessage()
- func (m *Packet) Reset()
- func (m *Packet) Size() (n int)
- func (this *Packet) String() string
- func (m *Packet) Unmarshal(dAtA []byte) error
- type Packet_PacketType
- type Stat
- func (*Stat) Descriptor() ([]byte, []int)
- func (this *Stat) Equal(that interface{}) bool
- func (m *Stat) GetDevmajor() int64
- func (m *Stat) GetDevminor() int64
- func (m *Stat) GetGid() uint32
- func (m *Stat) GetLinkname() string
- func (m *Stat) GetModTime() int64
- func (m *Stat) GetMode() uint32
- func (m *Stat) GetPath() string
- func (m *Stat) GetSize_() int64
- func (m *Stat) GetUid() uint32
- func (m *Stat) GetXattrs() map[string][]byte
- func (this *Stat) GoString() string
- func (m *Stat) Marshal() (dAtA []byte, err error)
- func (m *Stat) MarshalTo(dAtA []byte) (int, error)
- func (*Stat) ProtoMessage()
- func (m *Stat) Reset()
- func (m *Stat) Size() (n int)
- func (this *Stat) String() string
- func (m *Stat) Unmarshal(dAtA []byte) error
- type StatInfo
- type Stream
- type Validator
- type WalkOpt
- type WriteToFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthStat = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStat = fmt.Errorf("proto: integer overflow") )
View Source
var ( ErrInvalidLengthWire = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowWire = fmt.Errorf("proto: integer overflow") )
View Source
var Packet_PacketType_name = map[int32]string{
0: "PACKET_STAT",
1: "PACKET_REQ",
2: "PACKET_DATA",
3: "PACKET_FIN",
}
View Source
var Packet_PacketType_value = map[string]int32{
"PACKET_STAT": 0,
"PACKET_REQ": 1,
"PACKET_DATA": 2,
"PACKET_FIN": 3,
}
Functions ¶
func ComparePath ¶
func GetWalkerFn ¶
func GetWalkerFn(root string) walkerFn
Types ¶
type ChangeFunc ¶
ChangeFunc is the type of function called for each change computed during a directory changes calculation.
type ChangeKind ¶
type ChangeKind int
ChangeKind is the type of modification that a change is making.
const ( // ChangeKindAdd represents an addition of // a file ChangeKindAdd ChangeKind = iota // ChangeKindModify represents a change to // an existing file ChangeKindModify // ChangeKindDelete represents a delete of // a file ChangeKindDelete )
type DiskWriter ¶
type DiskWriter struct {
// contains filtered or unexported fields
}
func NewDiskWriter ¶
func NewDiskWriter(ctx context.Context, dest string, opt DiskWriterOpt) (*DiskWriter, error)
func (*DiskWriter) HandleChange ¶
func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, err error) (retErr error)
type DiskWriterOpt ¶
type DiskWriterOpt struct { AsyncDataCb WriteToFunc SyncDataCb WriteToFunc NotifyCb func(ChangeKind, string, os.FileInfo, error) error }
type HandleChangeFn ¶
type Hardlinks ¶
type Hardlinks struct {
// contains filtered or unexported fields
}
func (*Hardlinks) HandleChange ¶
type Packet ¶
type Packet struct { Type Packet_PacketType `protobuf:"varint,1,opt,name=type,proto3,enum=fsutil.Packet_PacketType" json:"type,omitempty"` Stat *Stat `protobuf:"bytes,2,opt,name=stat" json:"stat,omitempty"` ID uint32 `protobuf:"varint,3,opt,name=ID,proto3" json:"ID,omitempty"` Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` }
func (*Packet) Descriptor ¶
func (*Packet) GetType ¶
func (m *Packet) GetType() Packet_PacketType
func (*Packet) ProtoMessage ¶
func (*Packet) ProtoMessage()
type Packet_PacketType ¶
type Packet_PacketType int32
const ( PACKET_STAT Packet_PacketType = 0 PACKET_REQ Packet_PacketType = 1 PACKET_DATA Packet_PacketType = 2 PACKET_FIN Packet_PacketType = 3 )
func (Packet_PacketType) EnumDescriptor ¶
func (Packet_PacketType) EnumDescriptor() ([]byte, []int)
func (Packet_PacketType) String ¶
func (x Packet_PacketType) String() string
type Stat ¶
type Stat struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Mode uint32 `protobuf:"varint,2,opt,name=mode,proto3" json:"mode,omitempty"` Uid uint32 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` Gid uint32 `protobuf:"varint,4,opt,name=gid,proto3" json:"gid,omitempty"` Size_ int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` ModTime int64 `protobuf:"varint,6,opt,name=modTime,proto3" json:"modTime,omitempty"` // int32 typeflag = 7; Linkname string `protobuf:"bytes,7,opt,name=linkname,proto3" json:"linkname,omitempty"` Devmajor int64 `protobuf:"varint,8,opt,name=devmajor,proto3" json:"devmajor,omitempty"` Devminor int64 `protobuf:"varint,9,opt,name=devminor,proto3" json:"devminor,omitempty"` Xattrs map[string][]byte `` /* 147-byte string literal not displayed */ }
func (*Stat) Descriptor ¶
func (*Stat) GetDevmajor ¶
func (*Stat) GetDevminor ¶
func (*Stat) GetLinkname ¶
func (*Stat) GetModTime ¶
func (*Stat) ProtoMessage ¶
func (*Stat) ProtoMessage()
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func (*Validator) HandleChange ¶
type WriteToFunc ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.