claws

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package claws provides the offical AWS SDK (v2)

Index

Constants

This section is empty.

Variables

View Source
var Prod = fx.Module(moduleName,

	fx.Decorate(func(l *zap.Logger) *zap.Logger { return l.Named(moduleName) }),

	fx.Provide(fx.Annotate(
		func(o env.Options) (c Config, err error) {
			o.Prefix = strings.ToUpper(moduleName) + "_"
			return c, env.Parse(&c, o)
		},
		fx.ParamTags(`optional:"true"`))),

	fx.Provide(fx.Annotate(New, fx.ParamTags(``, ``, `optional:"true"`, `optional:"true"`))),
)

Prod configures the DI for providng database connectivity

Functions

func DynamoEndpointDecorator added in v0.7.4

func DynamoEndpointDecorator(epurl string) func(c aws.Config) aws.Config

DynamoEndpointDecorator will change the resolvers to set the dynamodb endpoint since this AWS supports a local version of Dynamo

func New

func New(
	cfg Config,
	logs *zap.Logger,
	tp trace.TracerProvider,
	pr propagation.TextMapPropagator,
) (acfg aws.Config, err error)

New initialize an AWS config to be used to create clients for individual aws services. We would like run this during fx lifecycle phase to provide it with a context because it can block. But too many dependencies would have to wait for it.

Types

type Config

type Config struct {
	// LoadConfigTimeout bounds the time given to config loading
	LoadConfigTimeout time.Duration `env:"LOAD_CONFIG_TIMEOUT" envDefault:"100ms"`
}

Config configures this package

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL