Documentation ¶
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, ...) 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)deprecated
- 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
- 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
- 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 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.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 ¶ added in v0.17.0
func (m *BytesMessage) CloneMessageVT() proto.Message
func (*BytesMessage) CloneVT ¶ added in v0.17.0
func (m *BytesMessage) CloneVT() *BytesMessage
func (*BytesMessage) Descriptor
deprecated
func (*BytesMessage) Descriptor() ([]byte, []int)
Deprecated: Use BytesMessage.ProtoReflect.Descriptor instead.
func (*BytesMessage) EqualMessageVT ¶ added in v0.17.0
func (this *BytesMessage) EqualMessageVT(thatMsg proto.Message) bool
func (*BytesMessage) EqualVT ¶ added in v0.17.0
func (this *BytesMessage) EqualVT(that *BytesMessage) bool
func (*BytesMessage) GetData ¶
func (x *BytesMessage) GetData() []byte
func (*BytesMessage) MarshalToSizedBufferVT ¶ added in v0.17.0
func (m *BytesMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*BytesMessage) MarshalToVT ¶ added in v0.17.0
func (m *BytesMessage) MarshalToVT(dAtA []byte) (int, error)
func (*BytesMessage) MarshalVT ¶ added in v0.17.0
func (m *BytesMessage) MarshalVT() (dAtA []byte, err error)
func (*BytesMessage) ProtoMessage ¶
func (*BytesMessage) ProtoMessage()
func (*BytesMessage) ProtoReflect ¶ added in v0.17.0
func (x *BytesMessage) ProtoReflect() protoreflect.Message
func (*BytesMessage) Reset ¶
func (x *BytesMessage) Reset()
func (*BytesMessage) SizeVT ¶ added in v0.17.0
func (m *BytesMessage) SizeVT() (n int)
func (*BytesMessage) String ¶
func (x *BytesMessage) String() string
func (*BytesMessage) UnmarshalVT ¶ added in v0.17.0
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 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 ¶ added in v0.13.0
type FSSyncTarget interface {
// contains filtered or unexported methods
}
func WithFSSync ¶ added in v0.13.0
func WithFSSync(id int, f FileOutputFunc) FSSyncTarget
func WithFSSyncDir ¶ added in v0.13.0
func WithFSSyncDir(id int, outdir string) FSSyncTarget
type FileOutputFunc ¶ added in v0.13.0
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 ¶ added in v0.10.0
type InvalidSessionError struct {
// contains filtered or unexported fields
}
func (InvalidSessionError) Error ¶ added in v0.10.0
func (e InvalidSessionError) Error() string
func (InvalidSessionError) Unwrap ¶ added in v0.10.0
func (e InvalidSessionError) Unwrap() error
type StaticDirSource ¶ added in v0.11.0
type UnimplementedFileSendServer ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (UnimplementedFileSendServer) DiffCopy(grpc.BidiStreamingServer[BytesMessage, BytesMessage]) error
type UnimplementedFileSyncServer ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (UnimplementedFileSyncServer) DiffCopy(grpc.BidiStreamingServer[types.Packet, types.Packet]) error
func (UnimplementedFileSyncServer) TarStream ¶ added in v0.7.0
func (UnimplementedFileSyncServer) TarStream(grpc.BidiStreamingServer[types.Packet, types.Packet]) error
type UnsafeFileSendServer ¶ added in v0.17.0
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 ¶ added in v0.17.0
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.