package awsappmesh import ( "github.com/aws/aws-cdk-go/awscdk/v2" ) // Properties used to define HTTP Based healthchecks. // // Example: // var mesh mesh // vpc := ec2.NewVpc(this, jsii.String("vpc")) // namespace := cloudmap.NewPrivateDnsNamespace(this, jsii.String("test-namespace"), &PrivateDnsNamespaceProps{ // Vpc: Vpc, // Name: jsii.String("domain.local"), // }) // service := namespace.CreateService(jsii.String("Svc")) // node := mesh.addVirtualNode(jsii.String("virtual-node"), &VirtualNodeBaseProps{ // ServiceDiscovery: appmesh.ServiceDiscovery_CloudMap(service), // Listeners: []virtualNodeListener{ // appmesh.*virtualNodeListener_Http(&HttpVirtualNodeListenerOptions{ // Port: jsii.Number(8081), // HealthCheck: appmesh.HealthCheck_Http(&HttpHealthCheckOptions{ // HealthyThreshold: jsii.Number(3), // Interval: awscdk.Duration_Seconds(jsii.Number(5)), // // minimum // Path: jsii.String("/health-check-path"), // Timeout: awscdk.Duration_*Seconds(jsii.Number(2)), // // minimum // UnhealthyThreshold: jsii.Number(2), // }), // }), // }, // AccessLog: appmesh.AccessLog_FromFilePath(jsii.String("/dev/stdout")), // }) // type HttpHealthCheckOptions struct { // The number of consecutive successful health checks that must occur before declaring listener healthy. HealthyThreshold *float64 `field:"optional" json:"healthyThreshold" yaml:"healthyThreshold"` // The time period between each health check execution. Interval awscdk.Duration `field:"optional" json:"interval" yaml:"interval"` // The destination path for the health check request. Path *string `field:"optional" json:"path" yaml:"path"` // The amount of time to wait when receiving a response from the health check. Timeout awscdk.Duration `field:"optional" json:"timeout" yaml:"timeout"` // The number of consecutive failed health checks that must occur before declaring a listener unhealthy. UnhealthyThreshold *float64 `field:"optional" json:"unhealthyThreshold" yaml:"unhealthyThreshold"` }