cloudmap

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudMap

type CloudMap struct {
	// define the AWS region that KMS is located at
	AwsRegion awsregion.AWSRegion

	// custom http2 client options
	HttpOptions *awshttp2.HttpClientSettings
	// contains filtered or unexported fields
}

CloudMap struct encapsulates the AWS CloudMap access functionality

func (*CloudMap) Connect

func (sd *CloudMap) Connect(parentSegment ...*xray.XRayParentSegment) (err error)

Connect will establish a connection to the CloudMap service

func (*CloudMap) CreateHttpNamespace

func (sd *CloudMap) CreateHttpNamespace(name string,
	creatorRequestId string,
	description string,
	tags map[string]string,
	timeOutDuration ...time.Duration) (operationId string, err error)

CreateHttpNamespace creates an http namespace for AWS cloud map

Service instances registered to http namespace can be discovered using DiscoverInstances(),

however, service instances cannot be discovered via dns

Parameters:

  1. name = (required) name of the http namespace to create
  2. creatorRequestId = (required) random and unique string to identify this create namespace action (such as uuid)
  3. description = (optional) http namespace description
  4. tags = (optional) one or more key value pairs to store as namespace tags
  5. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. operationId = string representing the identifier to be used to check on operation status at a later time
  2. err = contains error info if error was encountered

func (*CloudMap) CreatePrivateDnsNamespace

func (sd *CloudMap) CreatePrivateDnsNamespace(name string,
	creatorRequestId string,
	vpc string,
	description string,
	tags map[string]string,
	timeOutDuration ...time.Duration) (operationId string, err error)

CreatePrivateDnsNamespace creates a private dns based namespace, visible only inside a specified aws vpc,

this namespace defines service naming scheme,
for example:
	if namespace is named as 'example.com', and service is named as 'xyz-service',
	the resulting dns name for the service will be 'xyz-service.example.com'

Parameters:

  1. name = (required) name of the private dns namespace to create
  2. creatorRequestId = (required) random and unique string to identify this create namespace action (such as uuid)
  3. vpc = (required) aws vpc id that this private dns associated with
  4. description = (optional) private dns namespace description
  5. tags = (optional) one or more key value pairs to store as namespace tags
  6. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. operationId = string representing the identifier to be used to check on operation status at a later time
  2. err = contains error info if error was encountered

func (*CloudMap) CreatePublicDnsNamespace

func (sd *CloudMap) CreatePublicDnsNamespace(name string,
	creatorRequestId string,
	description string,
	tags map[string]string,
	timeOutDuration ...time.Duration) (operationId string, err error)

CreatePublicDnsNamespace creates a public dns based namespace, accessible via the public internet,

this namespace defines service naming scheme,
for example:
	if namespace is named as 'example.com', and service is named as 'xyz-service',
	the resulting dns name for the service will be 'xyz-service.example.com'

Parameters:

  1. name = (required) name of the public dns namespace to create
  2. creatorRequestId = (required) random and unique string to identify this create namespace action (such as uuid)
  3. description = (optional) public dns namespace description
  4. tags = (optional) one or more key value pairs to store as namespace tags
  5. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. operationId = string representing the identifier to be used to check on operation status at a later time
  2. err = contains error info if error was encountered

func (*CloudMap) CreateService

func (sd *CloudMap) CreateService(name string,
	creatorRequestId string,
	namespaceId string,
	dnsConf *DnsConf,
	healthCheckConf *HealthCheckConf,
	description string,
	tags map[string]string,
	timeOutDuration ...time.Duration) (service *servicediscovery.Service, err error)

CreateService creates a service under a specific namespace

After service is created, use RegisterInstance() to register an instance for the given service

Parameters:

  1. name = (required) name of the service to create, under the given namespaceId
  2. creatorRequestId = (required) random and unique string to identify this create service action (such as uuid)
  3. namespaceId = (required) namespace that this service be created under
  4. dnsConf = (conditional) required for public and private dns namespaces, configures the dns parameters for this service
  5. healthCheckConf = (optional) nil will not set health check, otherwise sets a health check condition for this services' instances
  6. description = (optional) public dns namespace description
  7. tags = (optional) one or more key value pairs to store as namespace tags
  8. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. service = service object that was created
  2. err = contains error info if error was encountered

func (*CloudMap) DeleteNamespace

func (sd *CloudMap) DeleteNamespace(namespaceId string, timeOutDuration ...time.Duration) (operationId string, err error)

DeleteNamespace deletes an existing namespace, however if namespace still has attached services, then action will fail

Parameters:

  1. namespaceId = (required) namespace id to delete

Return Values:

  1. operationId = represents the operation to be used for status check on this action via GetOperation()
  2. err = error info if any

func (*CloudMap) DeleteService

func (sd *CloudMap) DeleteService(serviceId string, timeOutDuration ...time.Duration) (err error)

DeleteService deletes the specified service,

if the service still contains one or more registered instances, the delete action will fail

Parameters:

  1. serviceId = (required) service to be deleted via the specified service id
  2. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. err = nil indicates success; contains error info if error was encountered

func (*CloudMap) DeregisterInstance

func (sd *CloudMap) DeregisterInstance(instanceId string,
	serviceId string,
	timeOutDuration ...time.Duration) (operationId string, err error)

DeregisterInstance deletes the route 53 dns record and health check (if any),

that was created by cloud map for the specified instance

Parameters:

  1. instanceId = (required) instance to deregister
  2. serviceId = (required) the associated service

Return Values:

  1. operationId = operation identifier to be used with GetOperation for action completion status check
  2. err = error info if any

func (*CloudMap) Disconnect

func (sd *CloudMap) Disconnect()

Disconnect clear client

func (*CloudMap) DiscoverInstances

func (sd *CloudMap) DiscoverInstances(namespaceName string,
	serviceName string,
	isHealthy bool,
	queryParameters map[string]string,
	maxResults *int64,
	timeOutDuration ...time.Duration) (instances []*servicediscovery.HttpInstanceSummary, err error)

DiscoverInstances discovers registered instances for a specified namespace and service

Notes:

  1. Used to discover instances for any type of namespace (http, private dns, public dns)
  2. For public and private dns namespaces, may also use dns queries to discover distances instead

Parameters:

  1. namespaceName = (required) name of the namespace to be discovered
  2. serviceName = (required) name of the service to be discovered
  3. isHealthy = (required) discover healthy or unhealthy instances
  4. queryParameters = (optional) map of key value pairs, containing custom attributes registered during RegisterInstance, if custom attributes is specified, all attributes in the queryParameters must match for the instance to discover
  5. maxResults = (optional) max count of discovered instances to return, if not specified, up to 100 is returned
  6. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. instances = slice of discovered instance objects
  2. err = error info if any

func (*CloudMap) GetInstance

func (sd *CloudMap) GetInstance(instanceId string,
	serviceId string,
	timeOutDuration ...time.Duration) (instance *servicediscovery.Instance, err error)

GetInstance gets information about a specified instance

Parameters:

  1. instanceId = (required) instance to get
  2. serviceId = (required) the associated service

Return Values:

  1. instance = instance object retrieved
  2. err = error info if any

func (*CloudMap) GetInstancesHealthStatus

func (sd *CloudMap) GetInstancesHealthStatus(serviceId string,
	instanceIds []string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (status map[string]string, moreNextToken string, err error)

GetInstancesHealthStatus gets the current health status (healthy, unhealthy, unknown) of one or more instances,

that are associated with a specified service

There is a brief delay between register an instance and when the health status for the instance is available

Parameters:

  1. serviceId = (required) service id assciated with the instances being checked
  2. instanceIds = (optional) list of instance ids to check health status on, if omitted, then all instances of given service is checked
  3. maxResults = (optional) specifies maximum count to return
  4. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  5. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. status = map of instance status (key = instance id, value = health status 'healthy', 'unhealthy', 'unknown')
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) GetInstancesHealthStatusPages

func (sd *CloudMap) GetInstancesHealthStatusPages(serviceId string,
	instanceIds []string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (status map[string]string, moreNextToken string, err error)

GetInstancesHealthStatusPages gets the current health status (healthy, unhealthy, unknown) of one or more instances,

that are associated with a specified service
(issues multiple page requests until max results is met or all data is retrieved)

There is a brief delay between register an instance and when the health status for the instance is available

Parameters:

  1. serviceId = (required) service id assciated with the instances being checked
  2. instanceIds = (optional) list of instance ids to check health status on, if omitted, then all instances of given service is checked
  3. maxResults = (optional) specifies maximum count to return
  4. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  5. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. status = map of instance status (key = instance id, value = health status 'healthy', 'unhealthy', 'unknown')
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) GetNamespace

func (sd *CloudMap) GetNamespace(namespaceId string, timeOutDuration ...time.Duration) (namespace *servicediscovery.Namespace, err error)

GetNamespace gets the information about a specific namespace

Parameters:

  1. namespaceId = (required) namespace id used for search
  2. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. namespace = sd namespace object found
  2. err = error info if any

func (*CloudMap) GetOperation

func (sd *CloudMap) GetOperation(operationId string, timeOutDuration ...time.Duration) (operation *servicediscovery.Operation, err error)

GetOperation gets information about any operation that returned an operationId in the response,

such as CreateHttpNamespace(), CreateService(), etc

Parameters:

  1. operationId = (required) the operation to retrieve, operationId is obtained during Create, and other related actions
  2. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. operation = operation object retrieved a) Targets = evaluate Targets to retrieve namespaceId, serviceId, InstanceId etc, using NAMESPACE, SERVICE, INSTANCE key names
  2. err = error info any

func (*CloudMap) GetService

func (sd *CloudMap) GetService(serviceId string, timeOutDuration ...time.Duration) (service *servicediscovery.Service, err error)

GetService gets a specified service's settings

Parameters:

  1. serviceId = (required) get service based on this service id
  2. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. service = service object found based on the provided serviceId
  2. err = contains error info if error was encountered

func (*CloudMap) ListInstances

func (sd *CloudMap) ListInstances(serviceId string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (instances []*servicediscovery.InstanceSummary, moreNextToken string, err error)

ListInstances lists summary information about the instances registered using a specified service

Parameters:

  1. serviceId = (required) service id assciated with the instances being checked
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. instances = slice of sd instance summary objects
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) ListInstancesPages

func (sd *CloudMap) ListInstancesPages(serviceId string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (instances []*servicediscovery.InstanceSummary, moreNextToken string, err error)

ListInstancesPages lists summary information about the instances registered using a specified service (issues multiple page requests until max results is met or all data is retrieved)

Parameters:

  1. serviceId = (required) service id assciated with the instances being checked
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. instances = slice of sd instance summary objects
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) ListNamespaces

func (sd *CloudMap) ListNamespaces(filter *sdnamespacefilter.SdNamespaceFilter,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (namespaces []*servicediscovery.NamespaceSummary, moreNextToken string, err error)

ListNamespaces gets summary information about namespaces created already

Parameters:

  1. filter = (optional) specifies namespace filter options
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. namespaces = slice of sd namespace summary objects
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) ListNamespacesPages

func (sd *CloudMap) ListNamespacesPages(filter *sdnamespacefilter.SdNamespaceFilter,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (namespaces []*servicediscovery.NamespaceSummary, moreNextToken string, err error)

ListNamespacesPages gets summary information about namespaces created already (issues multiple page requests until max results is met or all data is retrieved)

Parameters:

  1. filter = (optional) specifies namespace filter options
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. namespaces = slice of sd namespace summary objects
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) ListOperations

func (sd *CloudMap) ListOperations(filter map[sdoperationfilter.SdOperationFilter][]string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (operations []*servicediscovery.OperationSummary, moreNextToken string, err error)

ListOperations lists operations that match the criteria specified in parameters

Parameters:

  1. filter = (optional) map of filter operations (EQ_ filters allow single value per key) a) EQ_Status / IN_Status = Valid Values: SUBMITTED, PENDING, SUCCEED, FAIL b) EQ_Type / IN_Type = Valid Values: CREATE_NAMESPACE, DELETE_NAMESPACE, UPDATE_SERVICE, REGISTER_INSTANCE, DEREGISTER_INSTANCE c) BETWEEN_UpdateDate = begin and end in Unix DateTime in UTC
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. operations = slice of sd operation summary objects a) Targets = evaluate Targets to retrieve namespaceId, serviceId, InstanceId etc, using NAMESPACE, SERVICE, INSTANCE key names
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) ListOperationsPages

func (sd *CloudMap) ListOperationsPages(filter map[sdoperationfilter.SdOperationFilter][]string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (operations []*servicediscovery.OperationSummary, moreNextToken string, err error)

ListOperationsPages lists operations that match the criteria specified in parameters (issues multiple page requests until max results is met or all data is retrieved)

Parameters:

  1. filter = (optional) map of filter operations (EQ_ filters allow single value per key) a) EQ_Status / IN_Status = Valid Values: SUBMITTED, PENDING, SUCCEED, FAIL b) EQ_Type / IN_Type = Valid Values: CREATE_NAMESPACE, DELETE_NAMESPACE, UPDATE_SERVICE, REGISTER_INSTANCE, DEREGISTER_INSTANCE c) BETWEEN_UpdateDate = begin and end in Unix DateTime in UTC
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. operations = slice of sd operation summary objects a) Targets = evaluate Targets to retrieve namespaceId, serviceId, InstanceId etc, using NAMESPACE, SERVICE, INSTANCE key names
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) ListServices

func (sd *CloudMap) ListServices(filter []string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (services []*servicediscovery.ServiceSummary, moreNextToken string, err error)

ListServices lists summary information about all the services associated with one or more namespaces

Parameters:

  1. filter = (optional) filter by namespace(s) as specified, slice of namespaceId to filter
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. services = slice of sd service summary objects
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) ListServicesPages

func (sd *CloudMap) ListServicesPages(filter []string,
	maxResults *int64,
	nextToken *string,
	timeOutDuration ...time.Duration) (services []*servicediscovery.ServiceSummary, moreNextToken string, err error)

ListServicesPages lists summary information about all the services associated with one or more namespaces (issues multiple page requests until max results is met or all data is retrieved)

Parameters:

  1. filter = (optional) filter by namespace(s) as specified, slice of namespaceId to filter
  2. maxResults = (optional) specifies maximum count to return
  3. nextToken = (optional) if initial action, leave blank; if this is a subsequent action to get more, input the moreNextToken returned from a prior action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. namespaces = slice of sd service summary objects
  2. moreNextToken = if more data exists, this token can be used in a subsequent action via nextToken parameter
  3. err = error info if any

func (*CloudMap) RegisterInstance

func (sd *CloudMap) RegisterInstance(serviceId string,
	instanceId string,
	creatorRequestId string,
	attributes map[string]string,
	timeOutDuration ...time.Duration) (operationId string, err error)

RegisterInstance creates or updates one or more records,

and optionally creates a health check based on settings from the specified service

When RegisterInstance() request is submitted:

  1. for each dns record defined in the service as specified by ServiceId, a record is created or updated in the hosted zone that is associated with the corresponding namespace
  2. if the service includes HealthCheckConfig, a health check is created based on the settings in the health check configuration
  3. the health check is associated with each of the new or updated records (if applicable)

One RegisterInstance() request must complete before another is submitted

When AWS cloud map receives a dns query for the specified dns name,

  1. if the health check is healthy, all records returned
  2. if the health check is unhealthy, applicable value for the last healthy instance is returned
  3. if health check configuration wasn't specified, then all records are returned regardless healthy or otherwise

Parameters:

  1. serviceId = (required) register instance to this serviceId
  2. instanceId = (required) unique value for this instance, if instanceId already exists, this action will update instead of new
  3. creatorRequestId = (required) unique request id to use in case of a failure (during fail-retry, use the same creatorRequestId
  4. attributes = (required) map of attributes to register for this instance with the given serviceId, keys are as follows: a) AWS_ALIAS_DNS_NAME = instruct cloud map to create route 53 alias record to route traffic to an ELB, set the dns name associated with the load balancer to this key, the associated service RoutingPolicy must be WEIGHTED, when this key is set, DO NOT set values to any other AWS_INSTANCE attributes b) AWS_EC2_INSTANCE_ID = for http namespace only, sets this instance's EC2 instance ID, when this key is set, ONLY OTHER key allowed is AWS_INIT_HEALTH_STATUS, when this key is set, the AWS_INSTANCE_IPV4 attribute will be filled with the primary private IPv4 address c) AWS_INIT_HEALTH_STATUS = if associated service includes HealthCheckCustomConfig, then this key may be optionally set to specify the initial status of custom health check: HEALTHY or UNHEALTHY, if this key is not set, then initial status is HEALTHY d) AWS_INSTANCE_IPV4 = if associated service dns record type is A, then set the IPv4 address to this key, this key is required for service dns record type A e) AWS_INSTANCE_PORT = if associated service includes HealthCheckConfig, set the port for this endpoint that route 53 will send health check request to, this key is required for service having HealthCheckConfig set f) Custom Attributes = up to 30 custom attribute key value pairs, key must not exceed 255 chars, value must not exceed 1024 chars, total of all custom attribute key value pairs combined cannot exceed 5000 chars

Return Values:

  1. operationId = identifier to be used with GetOperation for status check (to verify completion of action)
  2. err = contains error info if any

func (*CloudMap) UpdateInstanceCustomHealthStatus

func (sd *CloudMap) UpdateInstanceCustomHealthStatus(instanceId string,
	serviceId string,
	isHealthy bool,
	timeOutDuration ...time.Duration) (err error)

UpdateInstanceCustomHealthStatus submits a request to change the health status of a custom health check,

to healthy or unhealthy

This action works only with configuration of Custom Health Checks,

which was defined using HealthCheckCustomConfig when creating a service

This action cannot be used to change the status of a route 53 health check,

which was defined using HealthCheckConfig when creating a service

Parameters:

  1. instanceId = (required) update healthy status to this instanceId
  2. serviceId = (required) the associated service
  3. isHealthy = specify the health status during this update action
  4. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. err = nil indicates success; otherwise error info is included

func (*CloudMap) UpdateParentSegment added in v1.1.4

func (sd *CloudMap) UpdateParentSegment(parentSegment *xray.XRayParentSegment)

UpdateParentSegment updates this struct's xray parent segment, if no parent segment, set nil

func (*CloudMap) UpdateService

func (sd *CloudMap) UpdateService(serviceId string,
	dnsConfUpdate *DnsConf,
	healthCheckConfUpdate *HealthCheckConf,
	descriptionUpdate *string,
	timeOutDuration ...time.Duration) (operationId string, err error)

UpdateService submits request for the following operations:

  1. update the TTL for existing dnsRecords configurations
  2. add, update, or delete HealthCheckConfig for a specified service, HealthCheckCustomConfig cannot be added, updated or deleted via UpdateService action

Notes:

  1. public and private dns namespaces, a) if any existing dnsRecords or healthCheckConfig configurations are omitted from the UpdateService request, those omitted configurations ARE deleted from the service b) if any existing HealthCheckCustomConfig configurations are omitted from the UpdateService request, the omitted configurations ARE NOT deleted from the service
  2. when settings are updated for a service, aws cloud map also updates the corresponding settings in all the records and health checks, that were created by the given service

Parameters:

  1. serviceId = (required) service to update
  2. dnsConfUpdate = (required) update dns config to this value, if nil, existing dns configuration will be removed from service
  3. healthCheckConf = (optional) update health check config to this value, if nil, existing health check config will be removed from service
  4. descriptionUpdate = (optional) service description to update, if nil, existing description will be removed from service
  5. timeOutDuration = (optional) maximum time before timeout via context

Return Values:

  1. operationId = this action's operation id to be used in GetOperation for status check
  2. err = contains error info if error was encountered

type DnsConf

type DnsConf struct {
	TTL        int64
	MultiValue bool
	SRV        bool
}

DnsConf represents a dns config option to be used by CreateService for this project we will only use:

  1. ipv4 - dns record type A
  2. srv

TTL = dns record time to live in seconds MultiValue = true: route 53 returns up to 8 healthy targets if health check is enabled (otherwise, all targets assumed healthy)

false: route 53 uses WEIGHTED to return a random healthy target if health check is enabled (if no healthy target found, then any random target is used)

SRV = true: dns use SRV; false: dns use A

type HealthCheckConf

type HealthCheckConf struct {
	Custom                  bool
	FailureThreshold        int64
	PubDns_HealthCheck_Type sdhealthchecktype.SdHealthCheckType
	PubDns_HealthCheck_Path string
}

HealthCheckConf represents target health check configuration

Custom = true: use HealthCheckCustomConfig (for Http, Public Dns, Private Dns namespaces)

false: use HealthCheckConfig (for Public Dns namespace only)

FailureThreshold = if Custom is true:

		*) number of 30-second intervals that cloud map waits after
		   UpdateInstanceCustomHealthStatus is executed,
		   before changing the target health status
  if Custom is false:
		*) number of consecutive times health checks of target
		   must pass or fail for route 53 to consider healthy or unhealthy

PubDns_HealthCheck_Type = for public dns namespace only: the endpoint protocol type used for health check PubDns_HealthCheck_Path = for public dns namespace only: (Http and Https type ONLY),

path to service that responds to health check, that returns http status 2xx or 3xx as healthy

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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