Documentation ¶
Index ¶
- Variables
- type CloudformationResolverV2
- type CloudwatchEventsResolverV2
- type CloudwatchLogsResolverV2
- type CloudwatchResolverV2
- type DynamoDbResolver
- type DynamoDbStreamsResolverV2
- type Ec2ResolverV2
- type ElasticSearchResolverV2
- type FirehoseResolverV2
- type IamResolverV2
- type Instance
- type InstanceOption
- func WithClientFromEnv() (InstanceOption, error)
- func WithClientFromEnvCtx(ctx context.Context) (InstanceOption, error)
- func WithLabels(labels map[string]string) InstanceOption
- func WithLogger(logger *logrus.Logger) InstanceOption
- func WithTimeout(timeout time.Duration) InstanceOption
- func WithVersion(version string) InstanceOption
- type KinesisResolverV2
- type LambdaResolverV2
- type RedshiftResolverV2
- type Route53ResolverV2
- type S3ResolverV2
- type SecretsManagerResolverV2
- type Service
- type SesResolverV2
- type SnsResolverV2
- type SqsResolverV2
- type SsmResolverV2
- type StepFunctionsResolverV2
- type StsResolverV2
Constants ¶
This section is empty.
Variables ¶
var ( FixedPort = Service{Name: "all", Port: "4566/tcp"} CloudFormation = Service{Name: "cloudformation", Port: "4581/tcp"} CloudWatch = Service{Name: "cloudwatch", Port: "4582/tcp"} CloudWatchLogs = Service{Name: "cloudwatchlogs", Port: "4586/tcp"} CloudWatchEvents = Service{Name: "cloudwatchevents", Port: "4587/tcp"} DynamoDB = Service{Name: "dynamoDB", Port: "4569/tcp"} DynamoDBStreams = Service{Name: "dynamoDBStreams", Port: "4570/tcp"} EC2 = Service{Name: "ec2", Port: "4597/tcp"} ES = Service{Name: "es", Port: "4578/tcp"} Firehose = Service{Name: "firehose", Port: "4573/tcp"} IAM = Service{Name: "iam", Port: "4593/tcp"} Kinesis = Service{Name: "kinesis", Port: "4568/tcp"} Lambda = Service{Name: "lambda", Port: "4574/tcp"} Redshift = Service{Name: "redshift", Port: "4577/tcp"} Route53 = Service{Name: "route53", Port: "4580/tcp"} S3 = Service{Name: "s3", Port: "4572/tcp"} SecretsManager = Service{Name: "secretsmanager", Port: "4584/tcp"} SES = Service{Name: "ses", Port: "4579/tcp"} SNS = Service{Name: "sns", Port: "4575/tcp"} SQS = Service{Name: "sqs", Port: "4576/tcp"} SSM = Service{Name: "ssm", Port: "4583/tcp"} STS = Service{Name: "sts", Port: "4592/tcp"} StepFunctions = Service{Name: "stepfunctions", Port: "4585/tcp"} )
Supported AWS/localstack services
var AvailableServices = map[Service]struct{}{ FixedPort: {}, CloudFormation: {}, CloudWatch: {}, CloudWatchLogs: {}, CloudWatchEvents: {}, DynamoDB: {}, DynamoDBStreams: {}, EC2: {}, ES: {}, Firehose: {}, IAM: {}, Kinesis: {}, Lambda: {}, Redshift: {}, Route53: {}, S3: {}, SecretsManager: {}, SES: {}, SNS: {}, SQS: {}, SSM: {}, STS: {}, StepFunctions: {}, }
AvailableServices provides a map of all services for faster searches
Functions ¶
This section is empty.
Types ¶
type CloudformationResolverV2 ¶ added in v1.0.92
type CloudformationResolverV2 struct {
// contains filtered or unexported fields
}
func NewCloudformationResolverV2 ¶ added in v1.0.92
func NewCloudformationResolverV2(i *Instance) *CloudformationResolverV2
NewCloudformationResolverV2 resolves the services ResolverV2 endpoint
func (*CloudformationResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *CloudformationResolverV2) ResolveEndpoint(_ context.Context, _ cloudformation.EndpointParameters) (smithyendpoints.Endpoint, error)
type CloudwatchEventsResolverV2 ¶ added in v1.0.92
type CloudwatchEventsResolverV2 struct {
// contains filtered or unexported fields
}
func NewCloudwatchEventsResolverV2 ¶ added in v1.0.92
func NewCloudwatchEventsResolverV2(i *Instance) *CloudwatchEventsResolverV2
NewCloudwatchEventsResolverV2 resolves the services ResolverV2 endpoint
func (*CloudwatchEventsResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *CloudwatchEventsResolverV2) ResolveEndpoint(_ context.Context, _ cloudwatchevents.EndpointParameters) (smithyendpoints.Endpoint, error)
type CloudwatchLogsResolverV2 ¶ added in v1.0.92
type CloudwatchLogsResolverV2 struct {
// contains filtered or unexported fields
}
func NewCloudwatchLogsResolverV2 ¶ added in v1.0.92
func NewCloudwatchLogsResolverV2(i *Instance) *CloudwatchLogsResolverV2
NewCloudwatchLogsResolverV2 resolves the services ResolverV2 endpoint
func (*CloudwatchLogsResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *CloudwatchLogsResolverV2) ResolveEndpoint(_ context.Context, _ cloudwatchlogs.EndpointParameters) (smithyendpoints.Endpoint, error)
type CloudwatchResolverV2 ¶ added in v1.0.92
type CloudwatchResolverV2 struct {
// contains filtered or unexported fields
}
func NewCloudwatchResolverV2 ¶ added in v1.0.92
func NewCloudwatchResolverV2(i *Instance) *CloudwatchResolverV2
NewCloudwatchResolverV2 resolves the services ResolverV2 endpoint
func (*CloudwatchResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *CloudwatchResolverV2) ResolveEndpoint(_ context.Context, _ cloudwatch.EndpointParameters) (smithyendpoints.Endpoint, error)
type DynamoDbResolver ¶ added in v1.0.92
type DynamoDbResolver struct {
// contains filtered or unexported fields
}
func NewDynamoDbResolverV2 ¶ added in v1.0.92
func NewDynamoDbResolverV2(i *Instance) *DynamoDbResolver
NewDynamoDbResolverV2 resolves the services ResolverV2 endpoint
func (*DynamoDbResolver) ResolveEndpoint ¶ added in v1.0.92
func (c *DynamoDbResolver) ResolveEndpoint(_ context.Context, _ dynamodb.EndpointParameters) (smithyendpoints.Endpoint, error)
type DynamoDbStreamsResolverV2 ¶ added in v1.0.92
type DynamoDbStreamsResolverV2 struct {
// contains filtered or unexported fields
}
func NewDynamoDbStreamsResolverV2 ¶ added in v1.0.92
func NewDynamoDbStreamsResolverV2(i *Instance) *DynamoDbStreamsResolverV2
NewDynamoDbStreamsResolverV2 resolves the services ResolverV2 endpoint
func (*DynamoDbStreamsResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *DynamoDbStreamsResolverV2) ResolveEndpoint(_ context.Context, _ dynamodbstreams.EndpointParameters) (smithyendpoints.Endpoint, error)
type Ec2ResolverV2 ¶ added in v1.0.92
type Ec2ResolverV2 struct {
// contains filtered or unexported fields
}
func NewEc2ResolverV2 ¶ added in v1.0.92
func NewEc2ResolverV2(i *Instance) *Ec2ResolverV2
NewEc2ResolverV2 resolves the services ResolverV2 endpoint
func (*Ec2ResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *Ec2ResolverV2) ResolveEndpoint(_ context.Context, _ ec2.EndpointParameters) (smithyendpoints.Endpoint, error)
type ElasticSearchResolverV2 ¶ added in v1.0.92
type ElasticSearchResolverV2 struct {
// contains filtered or unexported fields
}
func NewElasticSearchResolverV2 ¶ added in v1.0.92
func NewElasticSearchResolverV2(i *Instance) *ElasticSearchResolverV2
NewElasticSearchResolverV2 resolves the services ResolverV2 endpoint
func (*ElasticSearchResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *ElasticSearchResolverV2) ResolveEndpoint(_ context.Context, _ elasticsearchservice.EndpointParameters) (smithyendpoints.Endpoint, error)
type FirehoseResolverV2 ¶ added in v1.0.92
type FirehoseResolverV2 struct {
// contains filtered or unexported fields
}
func NewFirehoseResolverV2 ¶ added in v1.0.92
func NewFirehoseResolverV2(i *Instance) *FirehoseResolverV2
NewFirehoseResolverV2 resolves the services ResolverV2 endpoint
func (*FirehoseResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *FirehoseResolverV2) ResolveEndpoint(_ context.Context, _ firehose.EndpointParameters) (smithyendpoints.Endpoint, error)
type IamResolverV2 ¶ added in v1.0.92
type IamResolverV2 struct {
// contains filtered or unexported fields
}
func NewIamResolverV2 ¶ added in v1.0.92
func NewIamResolverV2(i *Instance) *IamResolverV2
NewIamResolverV2 resolves the services ResolverV2 endpoint
func (*IamResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *IamResolverV2) ResolveEndpoint(_ context.Context, _ iam.EndpointParameters) (smithyendpoints.Endpoint, error)
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance manages the localstack
func NewInstance ¶
func NewInstance(opts ...InstanceOption) (*Instance, error)
NewInstance creates a new Instance Fails when Docker is not reachable
func NewInstanceCtx ¶ added in v1.0.3
func NewInstanceCtx(ctx context.Context, opts ...InstanceOption) (*Instance, error)
NewInstanceCtx is NewInstance, but with Context
func (*Instance) Endpoint ¶
Endpoint returns the endpoint for the given service Endpoints are allocated dynamically (to avoid blocked ports), but are fix after starting the instance
func (*Instance) EndpointV2 ¶
EndpointV2 returns the endpoint for the given service when used by aws-sdk-v2 Endpoints are allocated dynamically (to avoid blocked ports), but are fix after starting the instance
func (*Instance) StartWithContext ¶
StartWithContext starts the localstack and ends it when the context is done. Deprecated: Use Start/Stop instead, as shutdown is not reliable
type InstanceOption ¶
type InstanceOption func(i *Instance)
InstanceOption is an option that controls the behaviour of localstack.
func WithClientFromEnv ¶
func WithClientFromEnv() (InstanceOption, error)
WithClientFromEnv configures the instance to use a client that respects environment variables.
func WithClientFromEnvCtx ¶ added in v1.0.3
func WithClientFromEnvCtx(ctx context.Context) (InstanceOption, error)
WithClientFromEnvCtx like WithClientFromEnv but with context
func WithLabels ¶
func WithLabels(labels map[string]string) InstanceOption
WithLabels configures the labels that will be applied on the instance.
func WithLogger ¶
func WithLogger(logger *logrus.Logger) InstanceOption
WithLogger configures the instance to use the specified logger.
func WithTimeout ¶
func WithTimeout(timeout time.Duration) InstanceOption
WithTimeout configures the timeout for terminating the localstack instance. This was invented to prevent orphaned containers after panics. The default timeout is set to 5 minutes.
func WithVersion ¶
func WithVersion(version string) InstanceOption
WithVersion configures the instance to use a specific version of localstack. Must be a valid version string or "latest".
type KinesisResolverV2 ¶ added in v1.0.92
type KinesisResolverV2 struct {
// contains filtered or unexported fields
}
func NewKinesisResolverV2 ¶ added in v1.0.92
func NewKinesisResolverV2(i *Instance) *KinesisResolverV2
NewKinesisResolverV2 resolves the services ResolverV2 endpoint
func (*KinesisResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *KinesisResolverV2) ResolveEndpoint(_ context.Context, _ kinesis.EndpointParameters) (smithyendpoints.Endpoint, error)
type LambdaResolverV2 ¶ added in v1.0.92
type LambdaResolverV2 struct {
// contains filtered or unexported fields
}
func NewLambdaResolverV2 ¶ added in v1.0.92
func NewLambdaResolverV2(i *Instance) *LambdaResolverV2
NewLambdaResolverV2 resolves the services ResolverV2 endpoint
func (*LambdaResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *LambdaResolverV2) ResolveEndpoint(_ context.Context, _ lambda.EndpointParameters) (smithyendpoints.Endpoint, error)
type RedshiftResolverV2 ¶ added in v1.0.92
type RedshiftResolverV2 struct {
// contains filtered or unexported fields
}
func NewRedshiftResolverV2 ¶ added in v1.0.92
func NewRedshiftResolverV2(i *Instance) *RedshiftResolverV2
NewRedshiftResolverV2 resolves the services ResolverV2 endpoint
func (*RedshiftResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *RedshiftResolverV2) ResolveEndpoint(_ context.Context, _ redshift.EndpointParameters) (smithyendpoints.Endpoint, error)
type Route53ResolverV2 ¶ added in v1.0.92
type Route53ResolverV2 struct {
// contains filtered or unexported fields
}
func NewRoute53ResolverV2 ¶ added in v1.0.92
func NewRoute53ResolverV2(i *Instance) *Route53ResolverV2
NewRoute53ResolverV2 resolves the services ResolverV2 endpoint
func (*Route53ResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *Route53ResolverV2) ResolveEndpoint(_ context.Context, _ route53.EndpointParameters) (smithyendpoints.Endpoint, error)
type S3ResolverV2 ¶ added in v1.0.92
type S3ResolverV2 struct {
// contains filtered or unexported fields
}
func NewS3ResolverV2 ¶ added in v1.0.92
func NewS3ResolverV2(i *Instance) *S3ResolverV2
NewS3ResolverV2 resolves the services ResolverV2 endpoint
func (*S3ResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *S3ResolverV2) ResolveEndpoint(_ context.Context, _ s3.EndpointParameters) (smithyendpoints.Endpoint, error)
type SecretsManagerResolverV2 ¶ added in v1.0.92
type SecretsManagerResolverV2 struct {
// contains filtered or unexported fields
}
func NewSecretsManagerResolverV2 ¶ added in v1.0.92
func NewSecretsManagerResolverV2(i *Instance) *SecretsManagerResolverV2
NewSecretsManagerResolverV2 resolves the services ResolverV2 endpoint
func (*SecretsManagerResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *SecretsManagerResolverV2) ResolveEndpoint(_ context.Context, _ secretsmanager.EndpointParameters) (smithyendpoints.Endpoint, error)
type SesResolverV2 ¶ added in v1.0.92
type SesResolverV2 struct {
// contains filtered or unexported fields
}
func NewSesResolverV2 ¶ added in v1.0.92
func NewSesResolverV2(i *Instance) *SesResolverV2
NewSesResolverV2 resolves the services ResolverV2 endpoint
func (*SesResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *SesResolverV2) ResolveEndpoint(_ context.Context, _ ses.EndpointParameters) (smithyendpoints.Endpoint, error)
type SnsResolverV2 ¶ added in v1.0.92
type SnsResolverV2 struct {
// contains filtered or unexported fields
}
func NewSnsResolverV2 ¶ added in v1.0.92
func NewSnsResolverV2(i *Instance) *SnsResolverV2
NewSnsResolverV2 resolves the services ResolverV2 endpoint
func (*SnsResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *SnsResolverV2) ResolveEndpoint(_ context.Context, _ sns.EndpointParameters) (smithyendpoints.Endpoint, error)
type SqsResolverV2 ¶ added in v1.0.92
type SqsResolverV2 struct {
// contains filtered or unexported fields
}
func NewSqsResolverV2 ¶ added in v1.0.92
func NewSqsResolverV2(i *Instance) *SqsResolverV2
NewSqsResolverV2 resolves the services ResolverV2 endpoint
func (*SqsResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *SqsResolverV2) ResolveEndpoint(_ context.Context, _ sqs.EndpointParameters) (smithyendpoints.Endpoint, error)
type SsmResolverV2 ¶ added in v1.0.92
type SsmResolverV2 struct {
// contains filtered or unexported fields
}
func NewSsmResolverV2 ¶ added in v1.0.92
func NewSsmResolverV2(i *Instance) *SsmResolverV2
NewSsmResolverV2 resolves the services ResolverV2 endpoint
func (*SsmResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *SsmResolverV2) ResolveEndpoint(_ context.Context, _ ssm.EndpointParameters) (smithyendpoints.Endpoint, error)
type StepFunctionsResolverV2 ¶ added in v1.0.92
type StepFunctionsResolverV2 struct {
// contains filtered or unexported fields
}
func NewStepFunctionsResolverV2 ¶ added in v1.0.92
func NewStepFunctionsResolverV2(i *Instance) *StepFunctionsResolverV2
NewStepFunctionsResolverV2 resolves the services ResolverV2 endpoint
func (*StepFunctionsResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *StepFunctionsResolverV2) ResolveEndpoint(_ context.Context, _ sfn.EndpointParameters) (smithyendpoints.Endpoint, error)
type StsResolverV2 ¶ added in v1.0.92
type StsResolverV2 struct {
// contains filtered or unexported fields
}
func NewStsResolverV2 ¶ added in v1.0.92
func NewStsResolverV2(i *Instance) *StsResolverV2
NewStsResolverV2 resolves the services ResolverV2 endpoint
func (*StsResolverV2) ResolveEndpoint ¶ added in v1.0.92
func (c *StsResolverV2) ResolveEndpoint(_ context.Context, _ sts.EndpointParameters) (smithyendpoints.Endpoint, error)
Directories ¶
Path | Synopsis |
---|---|
internalfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |