()
| 25 | ) |
| 26 | |
| 27 | func ExampleOpenVariable() { |
| 28 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
| 29 | |
| 30 | // Establish a AWS V2 Config. |
| 31 | // See https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/ for more info. |
| 32 | ctx := context.Background() |
| 33 | cfg, err := config.LoadDefaultConfig(ctx) |
| 34 | if err != nil { |
| 35 | log.Fatal(err) |
| 36 | } |
| 37 | |
| 38 | // Construct a *runtimevar.Variable that watches the variable. |
| 39 | client := ssm.NewFromConfig(cfg) |
| 40 | v, err := awsparamstore.OpenVariable(client, "cfg-variable-name", runtimevar.StringDecoder, nil) |
| 41 | if err != nil { |
| 42 | log.Fatal(err) |
| 43 | } |
| 44 | defer v.Close() |
| 45 | } |
| 46 | |
| 47 | func Example_openVariableFromURL() { |
| 48 | // PRAGMA: This example is used on gocloud.dev; PRAGMA comments adjust how it is shown and can be ignored. |
nothing calls this directly
no test coverage detected