filesync

package
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2018 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package filesync is a generated protocol buffer package.

It is generated from these files:

filesync.proto

It has these top-level messages:

BytesMessage

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthFilesync = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFilesync   = fmt.Errorf("proto: integer overflow")
)

Functions

func CopyFileWriter

func CopyFileWriter(ctx context.Context, c session.Caller) (io.WriteCloser, error)

func CopyToCaller

func CopyToCaller(ctx context.Context, fs fsutil.FS, c session.Caller, progress func(int, bool)) error

func FSSync

func FSSync(ctx context.Context, c session.Caller, opt FSSendRequestOpt) error

FSSync initializes a transfer of files

func NewFSSyncProvider

func NewFSSyncProvider(dirs []SyncedDir) session.Attachable

NewFSSyncProvider creates a new provider for sending files from client

func NewFSSyncTarget

func NewFSSyncTarget(w io.WriteCloser) session.Attachable

NewFSSyncTarget allows writing into an io.WriteCloser

func NewFSSyncTargetDir

func NewFSSyncTargetDir(outdir string) session.Attachable

NewFSSyncTargetDir allows writing into a directory

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) MarshalTo

func (m *BytesMessage) MarshalTo(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

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
	OverrideExcludes bool // deprecated: this is used by docker/cli for automatically loading .dockerignore from the directory
	DestDir          string
	CacheUpdater     CacheUpdater
	ProgressCb       func(int, bool)
}

FSSendRequestOpt defines options for FSSend request

type FileSendClient

type FileSendClient interface {
	DiffCopy(ctx context.Context, opts ...grpc.CallOption) (FileSend_DiffCopyClient, error)
}

func NewFileSendClient

func NewFileSendClient(cc *grpc.ClientConn) FileSendClient

type FileSendServer

type FileSendServer interface {
	DiffCopy(FileSend_DiffCopyServer) error
}

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)
}

func NewFileSyncClient

func NewFileSyncClient(cc *grpc.ClientConn) FileSyncClient

type FileSyncServer

type FileSyncServer interface {
	DiffCopy(FileSync_DiffCopyServer) error
	TarStream(FileSync_TarStreamServer) error
}

type FileSync_DiffCopyClient

type FileSync_DiffCopyClient interface {
	Send(*BytesMessage) error
	Recv() (*BytesMessage, error)
	grpc.ClientStream
}

type FileSync_DiffCopyServer

type FileSync_DiffCopyServer interface {
	Send(*BytesMessage) error
	Recv() (*BytesMessage, error)
	grpc.ServerStream
}

type FileSync_TarStreamClient

type FileSync_TarStreamClient interface {
	Send(*BytesMessage) error
	Recv() (*BytesMessage, error)
	grpc.ClientStream
}

type FileSync_TarStreamServer

type FileSync_TarStreamServer interface {
	Send(*BytesMessage) error
	Recv() (*BytesMessage, error)
	grpc.ServerStream
}

type SyncedDir

type SyncedDir struct {
	Name     string
	Dir      string
	Excludes []string
	Map      func(*fstypes.Stat) bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL