Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type S3Reader ¶
type S3Reader struct {
// contains filtered or unexported fields
}
S3Reader reads objects from S3-compatible storage.
func NewS3Reader ¶
func NewS3Reader( log logrus.FieldLogger, cfg *config.S3UploadConfig, ) *S3Reader
NewS3Reader creates a new S3Reader from the given configuration.
func (*S3Reader) GetObject ¶
GetObject returns the contents of the given key. If the key does not exist, it returns (nil, nil).
func (*S3Reader) ListPrefixes ¶
ListPrefixes lists immediate "subdirectory" prefixes under the given prefix. The prefix should end with "/" (e.g. "results/runs/").
type Uploader ¶
type Uploader interface {
// Preflight verifies that the remote storage is reachable and writable.
// Writes a small test object to the bucket to fail fast on misconfiguration.
Preflight(ctx context.Context) error
// Upload uploads all files in localDir. The directory basename is
// used as a sub-prefix under the configured remote prefix.
Upload(ctx context.Context, localDir string) error
// UploadSuiteDir uploads a suite directory to remote storage under
// prefix + "/suites/" + dirname.
UploadSuiteDir(ctx context.Context, localSuiteDir string) error
}
Uploader uploads a local result directory to remote storage.
func NewS3Uploader ¶
func NewS3Uploader( log logrus.FieldLogger, cfg *config.S3UploadConfig, ) (Uploader, error)
NewS3Uploader creates a new S3 uploader from the given configuration.
Click to show internal directories.
Click to hide internal directories.