Documentation
¶
Index ¶
- Variables
- func CopyFileWriter(ctx context.Context, md map[string]string, id int, c session.Caller) (io.WriteCloser, error)
- func CopyToCaller(ctx context.Context, fs fsutil.FS, id int, c session.Caller, ...) error
- func FSSync(ctx context.Context, c session.Caller, opt FSSendRequestOpt) error
- func NewFSSyncProvider(dirs DirSource) session.Attachable
- func NewFSSyncTarget(targets ...FSSyncTarget) session.Attachable
- func RegisterFileSendServer(s *grpc.Server, srv FileSendServer)
- func RegisterFileSyncServer(s *grpc.Server, srv FileSyncServer)
- type BytesMessage
- func (*BytesMessage) Descriptor() ([]byte, []int)
- func (this *BytesMessage) Equal(that interface{}) bool
- func (m *BytesMessage) GetData() []byte
- func (this *BytesMessage) GoString() string
- func (m *BytesMessage) Marshal() (dAtA []byte, err error)
- func (m *BytesMessage) MarshalTo(dAtA []byte) (int, error)
- func (m *BytesMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BytesMessage) ProtoMessage()
- func (m *BytesMessage) Reset()
- func (m *BytesMessage) Size() (n int)
- func (this *BytesMessage) String() string
- func (m *BytesMessage) Unmarshal(dAtA []byte) error
- func (m *BytesMessage) XXX_DiscardUnknown()
- func (m *BytesMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BytesMessage) XXX_Merge(src proto.Message)
- func (m *BytesMessage) XXX_Size() int
- func (m *BytesMessage) XXX_Unmarshal(b []byte) error
- type CacheUpdater
- type DirSource
- type FSSendRequestOpt
- type FSSyncTarget
- type FileOutputFunc
- type FileSendClient
- type FileSendServer
- type FileSend_DiffCopyClient
- type FileSend_DiffCopyServer
- type FileSyncClient
- type FileSyncServer
- type FileSync_DiffCopyClient
- type FileSync_DiffCopyServer
- type FileSync_TarStreamClient
- type FileSync_TarStreamServer
- type FindUpRequest
- func (*FindUpRequest) Descriptor() ([]byte, []int)
- func (this *FindUpRequest) Equal(that interface{}) bool
- func (m *FindUpRequest) GetNames() []string
- func (m *FindUpRequest) GetStart() string
- func (this *FindUpRequest) GoString() string
- func (m *FindUpRequest) Marshal() (dAtA []byte, err error)
- func (m *FindUpRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *FindUpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FindUpRequest) ProtoMessage()
- func (m *FindUpRequest) Reset()
- func (m *FindUpRequest) Size() (n int)
- func (this *FindUpRequest) String() string
- func (m *FindUpRequest) Unmarshal(dAtA []byte) error
- func (m *FindUpRequest) XXX_DiscardUnknown()
- func (m *FindUpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FindUpRequest) XXX_Merge(src proto.Message)
- func (m *FindUpRequest) XXX_Size() int
- func (m *FindUpRequest) XXX_Unmarshal(b []byte) error
- type FindUpResponse
- func (*FindUpResponse) Descriptor() ([]byte, []int)
- func (this *FindUpResponse) Equal(that interface{}) bool
- func (m *FindUpResponse) GetFound() map[string]string
- func (m *FindUpResponse) GetStart() string
- func (this *FindUpResponse) GoString() string
- func (m *FindUpResponse) Marshal() (dAtA []byte, err error)
- func (m *FindUpResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *FindUpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FindUpResponse) ProtoMessage()
- func (m *FindUpResponse) Reset()
- func (m *FindUpResponse) Size() (n int)
- func (this *FindUpResponse) String() string
- func (m *FindUpResponse) Unmarshal(dAtA []byte) error
- func (m *FindUpResponse) XXX_DiscardUnknown()
- func (m *FindUpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FindUpResponse) XXX_Merge(src proto.Message)
- func (m *FindUpResponse) XXX_Size() int
- func (m *FindUpResponse) XXX_Unmarshal(b []byte) error
- type InvalidSessionError
- type StaticDirSource
- type Stream
- type SyncedDir
- type UnimplementedFileSendServer
- type UnimplementedFileSyncServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CopyFileWriter ¶
func CopyToCaller ¶
func NewFSSyncProvider ¶
func NewFSSyncProvider(dirs DirSource) session.Attachable
NewFSSyncProvider creates a new provider for sending files from client
func NewFSSyncTarget ¶
func NewFSSyncTarget(targets ...FSSyncTarget) session.Attachable
func RegisterFileSendServer ¶
func RegisterFileSendServer(s *grpc.Server, srv FileSendServer)
func RegisterFileSyncServer ¶
func RegisterFileSyncServer(s *grpc.Server, srv FileSyncServer)
Types ¶
type BytesMessage ¶
type BytesMessage struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
BytesMessage contains a chunk of byte data
func (*BytesMessage) Descriptor ¶
func (*BytesMessage) Descriptor() ([]byte, []int)
func (*BytesMessage) Equal ¶
func (this *BytesMessage) Equal(that interface{}) bool
func (*BytesMessage) GetData ¶
func (m *BytesMessage) GetData() []byte
func (*BytesMessage) GoString ¶
func (this *BytesMessage) GoString() string
func (*BytesMessage) Marshal ¶
func (m *BytesMessage) Marshal() (dAtA []byte, err error)
func (*BytesMessage) MarshalToSizedBuffer ¶
func (m *BytesMessage) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BytesMessage) ProtoMessage ¶
func (*BytesMessage) ProtoMessage()
func (*BytesMessage) Reset ¶
func (m *BytesMessage) Reset()
func (*BytesMessage) Size ¶
func (m *BytesMessage) Size() (n int)
func (*BytesMessage) String ¶
func (this *BytesMessage) String() string
func (*BytesMessage) Unmarshal ¶
func (m *BytesMessage) Unmarshal(dAtA []byte) error
func (*BytesMessage) XXX_DiscardUnknown ¶
func (m *BytesMessage) XXX_DiscardUnknown()
func (*BytesMessage) XXX_Marshal ¶
func (m *BytesMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BytesMessage) XXX_Merge ¶
func (m *BytesMessage) XXX_Merge(src proto.Message)
func (*BytesMessage) XXX_Size ¶
func (m *BytesMessage) XXX_Size() int
func (*BytesMessage) XXX_Unmarshal ¶
func (m *BytesMessage) XXX_Unmarshal(b []byte) error
type CacheUpdater ¶
type CacheUpdater interface {
MarkSupported(bool)
HandleChange(fsutil.ChangeKind, string, os.FileInfo, error) error
ContentHasher() fsutil.ContentHasher
}
CacheUpdater is an object capable of sending notifications for the cache hash changes
type FSSendRequestOpt ¶
type FSSendRequestOpt struct {
Name string
IncludePatterns []string
ExcludePatterns []string
FollowPaths []string
DestDir string
CacheUpdater CacheUpdater
ProgressCb func(int, bool)
Filter func(string, *fstypes.Stat) bool
Differ fsutil.DiffType
}
FSSendRequestOpt defines options for FSSend request
type FSSyncTarget ¶
type FSSyncTarget interface {
// contains filtered or unexported methods
}
func WithFSSync ¶
func WithFSSync(id int, f FileOutputFunc) FSSyncTarget
func WithFSSyncDir ¶
func WithFSSyncDir(id int, outdir string) FSSyncTarget
type FileOutputFunc ¶
type FileOutputFunc func(map[string]string) (io.WriteCloser, error)
type FileSendClient ¶
type FileSendClient interface {
DiffCopy(ctx context.Context, opts ...grpc.CallOption) (FileSend_DiffCopyClient, error)
}
FileSendClient is the client API for FileSend service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFileSendClient ¶
func NewFileSendClient(cc *grpc.ClientConn) FileSendClient
type FileSendServer ¶
type FileSendServer interface {
DiffCopy(FileSend_DiffCopyServer) error
}
FileSendServer is the server API for FileSend service.
type FileSend_DiffCopyClient ¶
type FileSend_DiffCopyClient interface {
Send(*BytesMessage) error
Recv() (*BytesMessage, error)
grpc.ClientStream
}
type FileSend_DiffCopyServer ¶
type FileSend_DiffCopyServer interface {
Send(*BytesMessage) error
Recv() (*BytesMessage, error)
grpc.ServerStream
}
type FileSyncClient ¶
type FileSyncClient interface {
DiffCopy(ctx context.Context, opts ...grpc.CallOption) (FileSync_DiffCopyClient, error)
TarStream(ctx context.Context, opts ...grpc.CallOption) (FileSync_TarStreamClient, error)
// FindUp looks for each name in a directory and then in each of its
// parents, up to the root, in one call.
FindUp(ctx context.Context, in *FindUpRequest, opts ...grpc.CallOption) (*FindUpResponse, error)
}
FileSyncClient is the client API for FileSync service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewFileSyncClient ¶
func NewFileSyncClient(cc *grpc.ClientConn) FileSyncClient
type FileSyncServer ¶
type FileSyncServer interface {
DiffCopy(FileSync_DiffCopyServer) error
TarStream(FileSync_TarStreamServer) error
// FindUp looks for each name in a directory and then in each of its
// parents, up to the root, in one call.
FindUp(context.Context, *FindUpRequest) (*FindUpResponse, error)
}
FileSyncServer is the server API for FileSync service.
type FileSync_DiffCopyClient ¶
type FileSync_DiffCopyServer ¶
type FindUpRequest ¶
type FindUpRequest struct {
Start string `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
Names []string `protobuf:"bytes,2,rep,name=names,proto3" json:"names,omitempty"`
}
FindUpRequest names the directory to start from, resolved against the client's current directory, and the names to look for.
func (*FindUpRequest) Descriptor ¶
func (*FindUpRequest) Descriptor() ([]byte, []int)
func (*FindUpRequest) Equal ¶
func (this *FindUpRequest) Equal(that interface{}) bool
func (*FindUpRequest) GetNames ¶
func (m *FindUpRequest) GetNames() []string
func (*FindUpRequest) GetStart ¶
func (m *FindUpRequest) GetStart() string
func (*FindUpRequest) GoString ¶
func (this *FindUpRequest) GoString() string
func (*FindUpRequest) Marshal ¶
func (m *FindUpRequest) Marshal() (dAtA []byte, err error)
func (*FindUpRequest) MarshalToSizedBuffer ¶
func (m *FindUpRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FindUpRequest) ProtoMessage ¶
func (*FindUpRequest) ProtoMessage()
func (*FindUpRequest) Reset ¶
func (m *FindUpRequest) Reset()
func (*FindUpRequest) Size ¶
func (m *FindUpRequest) Size() (n int)
func (*FindUpRequest) String ¶
func (this *FindUpRequest) String() string
func (*FindUpRequest) Unmarshal ¶
func (m *FindUpRequest) Unmarshal(dAtA []byte) error
func (*FindUpRequest) XXX_DiscardUnknown ¶
func (m *FindUpRequest) XXX_DiscardUnknown()
func (*FindUpRequest) XXX_Marshal ¶
func (m *FindUpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FindUpRequest) XXX_Merge ¶
func (m *FindUpRequest) XXX_Merge(src proto.Message)
func (*FindUpRequest) XXX_Size ¶
func (m *FindUpRequest) XXX_Size() int
func (*FindUpRequest) XXX_Unmarshal ¶
func (m *FindUpRequest) XXX_Unmarshal(b []byte) error
type FindUpResponse ¶
type FindUpResponse struct {
Start string `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
Found map[string]string `` /* 151-byte string literal not displayed */
}
FindUpResponse gives the absolute start directory and, for each name found, the absolute path of the nearest directory holding it.
func (*FindUpResponse) Descriptor ¶
func (*FindUpResponse) Descriptor() ([]byte, []int)
func (*FindUpResponse) Equal ¶
func (this *FindUpResponse) Equal(that interface{}) bool
func (*FindUpResponse) GetFound ¶
func (m *FindUpResponse) GetFound() map[string]string
func (*FindUpResponse) GetStart ¶
func (m *FindUpResponse) GetStart() string
func (*FindUpResponse) GoString ¶
func (this *FindUpResponse) GoString() string
func (*FindUpResponse) Marshal ¶
func (m *FindUpResponse) Marshal() (dAtA []byte, err error)
func (*FindUpResponse) MarshalToSizedBuffer ¶
func (m *FindUpResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FindUpResponse) ProtoMessage ¶
func (*FindUpResponse) ProtoMessage()
func (*FindUpResponse) Reset ¶
func (m *FindUpResponse) Reset()
func (*FindUpResponse) Size ¶
func (m *FindUpResponse) Size() (n int)
func (*FindUpResponse) String ¶
func (this *FindUpResponse) String() string
func (*FindUpResponse) Unmarshal ¶
func (m *FindUpResponse) Unmarshal(dAtA []byte) error
func (*FindUpResponse) XXX_DiscardUnknown ¶
func (m *FindUpResponse) XXX_DiscardUnknown()
func (*FindUpResponse) XXX_Marshal ¶
func (m *FindUpResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FindUpResponse) XXX_Merge ¶
func (m *FindUpResponse) XXX_Merge(src proto.Message)
func (*FindUpResponse) XXX_Size ¶
func (m *FindUpResponse) XXX_Size() int
func (*FindUpResponse) XXX_Unmarshal ¶
func (m *FindUpResponse) XXX_Unmarshal(b []byte) error
type InvalidSessionError ¶
type InvalidSessionError struct {
// contains filtered or unexported fields
}
func (InvalidSessionError) Error ¶
func (e InvalidSessionError) Error() string
func (InvalidSessionError) Unwrap ¶
func (e InvalidSessionError) Unwrap() error
type StaticDirSource ¶
type UnimplementedFileSendServer ¶
type UnimplementedFileSendServer struct {
}
UnimplementedFileSendServer can be embedded to have forward compatible implementations.
func (*UnimplementedFileSendServer) DiffCopy ¶
func (*UnimplementedFileSendServer) DiffCopy(srv FileSend_DiffCopyServer) error
type UnimplementedFileSyncServer ¶
type UnimplementedFileSyncServer struct {
}
UnimplementedFileSyncServer can be embedded to have forward compatible implementations.
func (*UnimplementedFileSyncServer) DiffCopy ¶
func (*UnimplementedFileSyncServer) DiffCopy(srv FileSync_DiffCopyServer) error
func (*UnimplementedFileSyncServer) FindUp ¶
func (*UnimplementedFileSyncServer) FindUp(ctx context.Context, req *FindUpRequest) (*FindUpResponse, error)
func (*UnimplementedFileSyncServer) TarStream ¶
func (*UnimplementedFileSyncServer) TarStream(srv FileSync_TarStreamServer) error