package filesync
import "github.com/moby/buildkit/session/filesync"
Index ¶
- Constants
- 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, progress func(int, bool)) 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.ServiceRegistrar, srv FileSendServer)
- func RegisterFileSyncServer(s grpc.ServiceRegistrar, srv FileSyncServer)
- type BytesMessage
- func (m *BytesMessage) CloneMessageVT() proto.Message
- func (m *BytesMessage) CloneVT() *BytesMessage
- func (*BytesMessage) Descriptor() ([]byte, []int)
- func (this *BytesMessage) EqualMessageVT(thatMsg proto.Message) bool
- func (this *BytesMessage) EqualVT(that *BytesMessage) bool
- func (x *BytesMessage) GetData() []byte
- func (m *BytesMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *BytesMessage) MarshalToVT(dAtA []byte) (int, error)
- func (m *BytesMessage) MarshalVT() (dAtA []byte, err error)
- func (*BytesMessage) ProtoMessage()
- func (x *BytesMessage) ProtoReflect() protoreflect.Message
- func (x *BytesMessage) Reset()
- func (m *BytesMessage) SizeVT() (n int)
- func (x *BytesMessage) String() string
- func (m *BytesMessage) UnmarshalVT(dAtA []byte) error
- type CacheUpdater
- type DirSource
- type FSSendRequestOpt
- type FSSyncTarget
- func WithFSSync(id int, f FileOutputFunc) FSSyncTarget
- func WithFSSyncDir(id int, outdir string) 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 InvalidSessionError
- type StaticDirSource
- type Stream
- type SyncedDir
- type UnimplementedFileSendServer
- type UnimplementedFileSyncServer
- func (UnimplementedFileSyncServer) DiffCopy(grpc.BidiStreamingServer[types.Packet, types.Packet]) error
- func (UnimplementedFileSyncServer) TarStream(grpc.BidiStreamingServer[types.Packet, types.Packet]) error
- type UnsafeFileSendServer
- type UnsafeFileSyncServer
Constants ¶
const ( FileSync_DiffCopy_FullMethodName = "/moby.filesync.v1.FileSync/DiffCopy" FileSync_TarStream_FullMethodName = "/moby.filesync.v1.FileSync/TarStream" )
const (
FileSend_DiffCopy_FullMethodName = "/moby.filesync.v1.FileSend/DiffCopy"
)
Variables ¶
var FileSend_ServiceDesc = grpc.ServiceDesc{ ServiceName: "moby.filesync.v1.FileSend", HandlerType: (*FileSendServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "DiffCopy", Handler: _FileSend_DiffCopy_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "github.com/moby/buildkit/session/filesync/filesync.proto", }
FileSend_ServiceDesc is the grpc.ServiceDesc for FileSend service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var FileSync_ServiceDesc = grpc.ServiceDesc{ ServiceName: "moby.filesync.v1.FileSync", HandlerType: (*FileSyncServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "DiffCopy", Handler: _FileSync_DiffCopy_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "TarStream", Handler: _FileSync_TarStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "github.com/moby/buildkit/session/filesync/filesync.proto", }
FileSync_ServiceDesc is the grpc.ServiceDesc for FileSync service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_github_com_moby_buildkit_session_filesync_filesync_proto protoreflect.FileDescriptor
Functions ¶
func CopyFileWriter ¶
func CopyFileWriter(ctx context.Context, md map[string]string, id int, c session.Caller) (io.WriteCloser, error)
func CopyToCaller ¶
func CopyToCaller(ctx context.Context, fs fsutil.FS, id int, c session.Caller, progress func(int, bool)) error
func FSSync ¶
FSSync initializes a transfer of files
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.ServiceRegistrar, srv FileSendServer)
func RegisterFileSyncServer ¶
func RegisterFileSyncServer(s grpc.ServiceRegistrar, srv FileSyncServer)
Types ¶
type BytesMessage ¶
type BytesMessage struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
BytesMessage contains a chunk of byte data
func (*BytesMessage) CloneMessageVT ¶
func (m *BytesMessage) CloneMessageVT() proto.Message
func (*BytesMessage) CloneVT ¶
func (m *BytesMessage) CloneVT() *BytesMessage
func (*BytesMessage) Descriptor ¶
func (*BytesMessage) Descriptor() ([]byte, []int)
Deprecated: Use BytesMessage.ProtoReflect.Descriptor instead.
func (*BytesMessage) EqualMessageVT ¶
func (this *BytesMessage) EqualMessageVT(thatMsg proto.Message) bool
func (*BytesMessage) EqualVT ¶
func (this *BytesMessage) EqualVT(that *BytesMessage) bool
func (*BytesMessage) GetData ¶
func (x *BytesMessage) GetData() []byte
func (*BytesMessage) MarshalToSizedBufferVT ¶
func (m *BytesMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*BytesMessage) MarshalToVT ¶
func (m *BytesMessage) MarshalToVT(dAtA []byte) (int, error)
func (*BytesMessage) MarshalVT ¶
func (m *BytesMessage) MarshalVT() (dAtA []byte, err error)
func (*BytesMessage) ProtoMessage ¶
func (*BytesMessage) ProtoMessage()
func (*BytesMessage) ProtoReflect ¶
func (x *BytesMessage) ProtoReflect() protoreflect.Message
func (*BytesMessage) Reset ¶
func (x *BytesMessage) Reset()
func (*BytesMessage) SizeVT ¶
func (m *BytesMessage) SizeVT() (n int)
func (*BytesMessage) String ¶
func (x *BytesMessage) String() string
func (*BytesMessage) UnmarshalVT ¶
func (m *BytesMessage) UnmarshalVT(dAtA []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 DirSource ¶
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) (grpc.BidiStreamingClient[BytesMessage, BytesMessage], error) }
FileSendClient is the client API for FileSend service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
FileSend allows sending files from the server back to the client.
func NewFileSendClient ¶
func NewFileSendClient(cc grpc.ClientConnInterface) FileSendClient
type FileSendServer ¶
type FileSendServer interface { DiffCopy(grpc.BidiStreamingServer[BytesMessage, BytesMessage]) error }
FileSendServer is the server API for FileSend service. All implementations should embed UnimplementedFileSendServer for forward compatibility.
FileSend allows sending files from the server back to the client.
type FileSend_DiffCopyClient ¶
type FileSend_DiffCopyClient = grpc.BidiStreamingClient[BytesMessage, BytesMessage]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FileSend_DiffCopyServer ¶
type FileSend_DiffCopyServer = grpc.BidiStreamingServer[BytesMessage, BytesMessage]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FileSyncClient ¶
type FileSyncClient interface { DiffCopy(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[types.Packet, types.Packet], error) TarStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[types.Packet, types.Packet], error) }
FileSyncClient is the client API for FileSync service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
FileSync exposes local files from the client to the server.
func NewFileSyncClient ¶
func NewFileSyncClient(cc grpc.ClientConnInterface) FileSyncClient
type FileSyncServer ¶
type FileSyncServer interface { DiffCopy(grpc.BidiStreamingServer[types.Packet, types.Packet]) error TarStream(grpc.BidiStreamingServer[types.Packet, types.Packet]) error }
FileSyncServer is the server API for FileSync service. All implementations should embed UnimplementedFileSyncServer for forward compatibility.
FileSync exposes local files from the client to the server.
type FileSync_DiffCopyClient ¶
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FileSync_DiffCopyServer ¶
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FileSync_TarStreamClient ¶
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FileSync_TarStreamServer ¶
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
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 ¶
func (StaticDirSource) LookupDir ¶
func (dirs StaticDirSource) LookupDir(name string) (fsutil.FS, bool)
type Stream ¶
type Stream interface { Context() context.Context SendMsg(m interface{}) error RecvMsg(m interface{}) error }
type SyncedDir ¶
type UnimplementedFileSendServer ¶
type UnimplementedFileSendServer struct{}
UnimplementedFileSendServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFileSendServer) DiffCopy ¶
func (UnimplementedFileSendServer) DiffCopy(grpc.BidiStreamingServer[BytesMessage, BytesMessage]) error
type UnimplementedFileSyncServer ¶
type UnimplementedFileSyncServer struct{}
UnimplementedFileSyncServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFileSyncServer) DiffCopy ¶
func (UnimplementedFileSyncServer) DiffCopy(grpc.BidiStreamingServer[types.Packet, types.Packet]) error
func (UnimplementedFileSyncServer) TarStream ¶
func (UnimplementedFileSyncServer) TarStream(grpc.BidiStreamingServer[types.Packet, types.Packet]) error
type UnsafeFileSendServer ¶
type UnsafeFileSendServer interface {
// contains filtered or unexported methods
}
UnsafeFileSendServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileSendServer will result in compilation errors.
type UnsafeFileSyncServer ¶
type UnsafeFileSyncServer interface {
// contains filtered or unexported methods
}
UnsafeFileSyncServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileSyncServer will result in compilation errors.
Source Files ¶
diffcopy.go diffcopy_unix.go filesync.go filesync.pb.go filesync_grpc.pb.go filesync_vtproto.pb.go
- Version
- v0.18.2
- Published
- Dec 16, 2024
- Platform
- js/wasm
- Imports
- 25 packages
- Last checked
- 12 hours ago –
Tools for package owners.