carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package lease
2
3import (
4 "context"
5 "errors"
6 "github.com/carlosframework/platform/internal/release"
7)
8
9// ExecutionStore reuses the replica leaser's S3 configuration and the release
10// store's conditional primitives. The execution controller owns its wire schema.
11func ExecutionStore(ctx context.Context, bucket, region string) (release.Store, error) {
12 if bucket == "" {
13 return nil, errors.New("lease: control bucket required")
14 }
15 client, _, err := newLeaserClient(ctx, region)
16 if err != nil {
17 return nil, err
18 }
19 return &release.S3Store{Client: client, Bucket: bucket}, nil
20}
21