Documentation
¶
Index ¶
- func ExtractWorkflowId(workflowPath string) (string, error)
- func ExtractYyyymmdd(workflowPath string) (string, error)
- func ExtractYyyymmddToUnixSeconds(workflowPath string) (int64, bool)
- func LoadDataObjectsFromExternalStorage(ctx context.Context, dataObjects []iwfidl.KeyValue, blobStore BlobStore) error
- func MustExtractWorkflowId(workflowPath string) string
- func ValidateWorkflowId(workflowId string) error
- func WriteDataObjectsToExternalStorage(ctx context.Context, dataObjects []iwfidl.KeyValue, workflowId string, ...) error
- type BlobStore
- type ListObjectPathsInput
- type ListObjectPathsOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractWorkflowId ¶
func ExtractYyyymmdd ¶
func MustExtractWorkflowId ¶
func ValidateWorkflowId ¶
Types ¶
type BlobStore ¶
type BlobStore interface { // WriteObject will write to the current active store // returns the active storeId // The final path pattern is pathPrefix + yyyymmdd$workflowId/uuid // But the returned path doesn't include pathPrefix, only yymmdd$workflowId/uuid WriteObject(ctx context.Context, workflowId, data string) (storeId, path string, err error) // ReadObject will read from the store by storeId and path // The path should be the one returned from WriteObject, in format of yyyymmdd$workflowId/uuid ReadObject(ctx context.Context, storeId, path string) (string, error) // DeleteWorkflowObjects will delete all the objects of the workflowId // workflowPath is yyyymmdd$workflowId, where yymmdd is needed to compose the path DeleteWorkflowObjects(ctx context.Context, storeId, workflowPath string) error // ListWorkflowPaths will list the workflowPaths ( yyyymmdd$workflowId ) as CommonPrefixes from S3 // It uses of delimiter "/" before the uuid to get all the CommonPrefixes // StartAfterYyyymmdd is the yyyymmdd to exclude the date when listing ListWorkflowPaths(ctx context.Context, input ListObjectPathsInput) (*ListObjectPathsOutput, error) // CountWorkflowObjectsForTesting is for testing ONLY. // count the number of S3 objects for this workflowId // Limitation: // 1. It doesn't count across two days(so expect test to fail if you happen to run the test across day boundary :) // 2. Only count less than 1000 objects(because it only make one API call to S3 which return at most 1000 objects) CountWorkflowObjectsForTesting(ctx context.Context, workflowId string) (int64, error) }
func NewBlobStore ¶
func NewBlobStore( s3Client *s3.Client, temporalOrCadenceNamespace string, storeConfig config.ExternalStorageConfig, logger log.Logger, metrics client.MetricsHandler, ) BlobStore
type ListObjectPathsInput ¶
type ListObjectPathsOutput ¶
Click to show internal directories.
Click to hide internal directories.