Documentation ¶
Index ¶
- func AppFileRequest(chunk []byte) *pluginclient.AppStreamRequest
- func GetCompressedRepoAndMetadata(repoPath string, appPath string, env []string, excludedGlobs []string, ...) (*os.File, *pluginclient.AppStreamRequest, error)
- func ReceiveRepoStream(ctx context.Context, receiver StreamReceiver, destDir string) (*pluginclient.ManifestRequestMetadata, error)
- func SendRepoStream(ctx context.Context, appPath, repoPath string, sender StreamSender, ...) error
- type SenderOption
- type StreamReceiver
- type StreamSender
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) (*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
Click to show internal directories.
Click to hide internal directories.