outputlocation

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInsecureUploadDestination is returned when a remote upload destination doesn't use https. Capture files
	// contain full packet payloads, so they must not be sent in plaintext.
	ErrInsecureUploadDestination = errors.New("upload destination must use https")
	// ErrInvalidUploadDestination is returned when a remote upload destination isn't a usable URL.
	ErrInvalidUploadDestination = errors.New("invalid upload destination")
)
View Source
var (
	ErrSandboxMountPathNotFound = errors.New("failed to find sandbox mount path")
)

Functions

func ValidateBlobUploadURL added in v1.3.3

func ValidateBlobUploadURL(blobSASURL string) error

ValidateBlobUploadURL checks a blob SAS URL (as stored in the blob upload secret, so surrounding quotes and whitespace are trimmed) before capture files are uploaded to it. Errors never include the URL itself, which carries the SAS token.

func ValidateS3Endpoint added in v1.3.3

func ValidateS3Endpoint(endpoint string) error

ValidateS3Endpoint checks a custom S3 endpoint. An empty endpoint is valid: the AWS SDK then derives an https endpoint from the region. Surrounding whitespace is ignored (the workload trims it too), but quotes are not stripped: unlike blob URLs, which are read from secret files, the endpoint comes from the Capture spec or a CLI flag, so quotes are a typo.

Types

type BlobUpload

type BlobUpload struct {
	// contains filtered or unexported fields
}

func (*BlobUpload) Enabled

func (bu *BlobUpload) Enabled() bool

func (*BlobUpload) Name

func (bu *BlobUpload) Name() string

func (*BlobUpload) Output

func (bu *BlobUpload) Output(ctx context.Context, srcFilePath string) error

type HostPath

type HostPath struct {
	// contains filtered or unexported fields
}

func (*HostPath) Enabled

func (hp *HostPath) Enabled() bool

func (*HostPath) Name

func (hp *HostPath) Name() string

func (*HostPath) Output

func (hp *HostPath) Output(_ context.Context, srcFilePath string) error

type Location

type Location interface {
	// Name returns the name of the output location.
	Name() string
	// Enabled checks whether a output location is enabled.
	Enabled() bool
	// Output outputs source file to the location specified by the users.
	Output(ctx context.Context, srcFilePath string) error
}

func NewBlobUpload

func NewBlobUpload(logger *log.ZapLogger) Location

func NewHostPath

func NewHostPath(logger *log.ZapLogger) Location

func NewPersistentVolumeClaim

func NewPersistentVolumeClaim(logger *log.ZapLogger) Location

func NewS3Upload added in v0.0.10

func NewS3Upload(logger *log.ZapLogger) Location

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	// contains filtered or unexported fields
}

func (*PersistentVolumeClaim) Enabled

func (pvc *PersistentVolumeClaim) Enabled() bool

func (*PersistentVolumeClaim) Name

func (pvc *PersistentVolumeClaim) Name() string

func (*PersistentVolumeClaim) Output

func (pvc *PersistentVolumeClaim) Output(_ context.Context, srcFilePath string) error

type S3Upload added in v0.0.10

type S3Upload struct {
	// contains filtered or unexported fields
}

func (*S3Upload) Enabled added in v0.0.10

func (su *S3Upload) Enabled() bool

func (*S3Upload) Name added in v0.0.10

func (su *S3Upload) Name() string

func (*S3Upload) Output added in v0.0.10

func (su *S3Upload) Output(ctx context.Context, srcFilePath string) error

Directories

Path Synopsis
managed package provides the functionality to manage the output locations for the Capture.
managed package provides the functionality to manage the output locations for the Capture.

Jump to

Keyboard shortcuts

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