cmp

package
v2.7.12 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppFileRequest added in v2.6.0

func AppFileRequest(chunk []byte) *pluginclient.AppStreamRequest

AppFileRequest build the file payload for the ManifestRequest

func GetCompressedRepoAndMetadata added in v2.6.0

func GetCompressedRepoAndMetadata(repoPath string, appPath string, env []string, excludedGlobs []string, opt *senderOption) (*os.File, *pluginclient.AppStreamRequest, error)

func ReceiveRepoStream

func ReceiveRepoStream(ctx context.Context, receiver StreamReceiver, destDir string, preserveFileMode bool) (*pluginclient.ManifestRequestMetadata, error)

ReceiveRepoStream will receive the repository files and save them in destDir. Will return the stream metadata if no error. Metadata will be nil in case of errors.

func SendRepoStream

func SendRepoStream(ctx context.Context, appPath, repoPath string, sender StreamSender, env []string, excludedGlobs []string, opts ...SenderOption) error

SendRepoStream will compress the files under the given repoPath and send them using the plugin stream sender.

Types

type SenderOption

type SenderOption func(*senderOption)

SenderOption defines the function type to by used by specific options

func WithTarDoneChan

func WithTarDoneChan(ch chan<- bool) SenderOption

type StreamReceiver

type StreamReceiver interface {
	Recv() (*pluginclient.AppStreamRequest, error)
}

StreamReceiver defines the contract for receiving Application's files over gRPC stream

type StreamSender

type StreamSender interface {
	Send(*pluginclient.AppStreamRequest) error
}

StreamSender defines the contract to send App files over stream

Jump to

Keyboard shortcuts

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