Class: Temporalio::Contrib::Aws::S3Driver::S3StorageDriverClient

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/contrib/aws/s3_driver/s3_storage_driver_client.rb

Overview

Note:

WARNING: This API is experimental and may change in the future.

S3 object operations used by S3StorageDriver.

This is kept separate from any particular S3 library so the driver does not depend on one. Use AwsSdkS3StorageDriverClient for the official aws-sdk-s3 gem, or subclass this to bring another client.

Implementations are called concurrently from multiple threads and must be thread safe.

Direct Known Subclasses

AwsSdkS3StorageDriverClient

Instance Method Summary collapse

Instance Method Details

#describe ⇒ Hash<String, String>

Client-specific diagnostic information, such as the region, that the driver appends to error messages to help diagnose misconfiguration.

Returns:

  • (Hash<String, String>) —

    Diagnostic information. Empty by default.



47
48
49
# File 'lib/temporalio/contrib/aws/s3_driver/s3_storage_driver_client.rb', line 47

def describe
  {}
end

#get_object(bucket:, key:) ⇒ String

Download the object at the given bucket and key.

Parameters:

  • bucket (String) —

    Bucket name.

  • key (String) —

    Object key.

Returns:

  • (String) —

    Binary object data.

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/temporalio/contrib/aws/s3_driver/s3_storage_driver_client.rb', line 39

def get_object(bucket:, key:)
  raise NotImplementedError
end

#object_exists?(bucket:, key:) ⇒ Boolean

Check whether an object exists at the given bucket and key.

Parameters:

  • bucket (String) —

    Bucket name.

  • key (String) —

    Object key.

Returns:

  • (Boolean) —

    Whether the object exists.

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/temporalio/contrib/aws/s3_driver/s3_storage_driver_client.rb', line 30

def object_exists?(bucket:, key:)
  raise NotImplementedError
end

#put_object(bucket:, key:, data:) ⇒ Object

Upload data to the given bucket and key.

Parameters:

  • bucket (String) —

    Bucket name.

  • key (String) —

    Object key.

  • data (String) —

    Binary data to upload.

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/temporalio/contrib/aws/s3_driver/s3_storage_driver_client.rb', line 21

def put_object(bucket:, key:, data:)
  raise NotImplementedError
end