diff --git a/sdk/README.md b/sdk/README.md index 5a073e315..9f164d99e 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -22,10 +22,11 @@ while taking care of the boring things for you: You can customise a component using the following environment variables: -| Environment Variable | Type | Required | Default | Possible Values | -|-------------------------------------|--------|-----------|--------------------------|--------------------------| -| SMITHY\_COMPONENT\_NAME | string | yes | - | - | -| SMITHY\_LOG\_LEVEL | string | false | info, debug, warn, error | +| Environment Variable | Type | Required | Default | Possible Values | +|-------------------------------------|--------|----------|--------------------------|-------------------------------------| +| SMITHY\_COMPONENT\_NAME | string | yes | - | - | +| SMITHY\_LOG\_LEVEL | string | false | info, debug, warn, error | +| SMITHY\_STORE\_TYPE | string | no | sqlite | sqlite, postgresql, findings-client | `Runners` can be supplied with `RunnerConfigOption`s to customise how a component runs. In the following example you can see how we change the component name: @@ -289,6 +290,27 @@ if err := component.RunReporter( } ``` +### Storages + +Smithy SDK allows to configure different storages to boost adoption. + +By default, [sqlite](https://www.sqlite.org/) is used for local development. + +#### Postgresql + +You can configure a Postgresql storage by plugging in `/store/remote/postgresql` or configuring the required +environment variables defined in its README. + +#### Findings Client + +You can configure a grpc findings client storage by plugging in `/store/remote/findings-client` or configuring the required +environment variables defined in its README. + +#### Custom + +You can supply your own implementation of a storage by satisfying the `componenent.Storer` interface and leveraging the +`RunnerWithStorer` option. + ### Contributing #### Database Schemas diff --git a/sdk/component/store/remote/findings-client/README.md b/sdk/component/store/remote/findings-client/README.md new file mode 100644 index 000000000..bd25a62d5 --- /dev/null +++ b/sdk/component/store/remote/findings-client/README.md @@ -0,0 +1,9 @@ +# Findings Client + +This implementation of `component.Storer` interacts with a findings client via GRPC. + +## Configuration + +| Environment Variable | Type | Required | Default | Possible Values | +|-------------------------------------|--------|----------|--------------------------|--------------------------| +| SMITHY\_REMOTE\_STORE\_FINDINGS\_SERVICE\_ADDR | string | no | localhost:50051 | - | diff --git a/sdk/component/store/remote/postgresql/README.md b/sdk/component/store/remote/postgresql/README.md new file mode 100644 index 000000000..0290d37ee --- /dev/null +++ b/sdk/component/store/remote/postgresql/README.md @@ -0,0 +1,9 @@ +# Postgresql + +This implementation of `component.Storer` interacts with postgresql. + +## Configuration + +| Environment Variable | Type | Required | Default | Possible Values | +|-------------------------------------|--------|----------|--------------------------|--------------------------| +| SMITHY\_REMOTE\_STORE\_POSTGRES\_DSN | string | yes | - | - |