Documentation
¶
Index ¶
- Variables
- func BuildHealthPK() string
- func BuildHealthSK(instanceId string) string
- func ConnectDataStore(cfg *config.Config) error
- func DeleteInstanceHealthFromDataStore(instanceKeys ...*dynamodb.DynamoDBTableKeyValue) (deleteFailKeys []*dynamodb.DynamoDBTableKeyValue, err error)
- func DeleteServerRouteFromDataStore(serverKey string) error
- func GetDynamoDBActionRetryAttempts() uint
- func GetGatewayKey() string
- func GetHashKey(name string) (secret string, found bool)
- func GetHashKeys() map[string]string
- func GetHashKeysCount() int
- func GetHealthReportCleanUpFrequencySeconds() uint
- func GetHealthReportRecordStaleMinutes() uint
- func GetInstanceHealthFromDataStore(instanceId string) (lastHealthy string, err error)
- func GetServerRouteFromDataStore(serverKey string) (serverUrl string, err error)
- func GetServiceDiscoveryTimeoutSeconds() uint
- func SetDynamoDBActionRetryAttempts(v uint)
- func SetGatewayKey(v string)
- func SetHashKeys(v map[string]string)
- func SetHealthReportCleanUpFrequencySeconds(v uint)
- func SetHealthReportRecordStaleMinutes(v uint)
- func SetInstanceHealthToDataStore(namespaceId string, serviceId string, instanceId string, awsRegion string, ...) (err error)
- func SetServiceDiscoveryTimeoutSeconds(v uint)
- type HealthStatus
Constants ¶
This section is empty.
Variables ¶
var DynamoDBActionRetryAttempts uint
Deprecated: Use GetDynamoDBActionRetryAttempts instead
var GatewayKey string
Deprecated: Use GetGatewayKey instead
var HashKeys map[string]string
Deprecated: Use GetHashKeys/SetHashKeys instead
var HealthReportCleanUpFrequencySeconds uint
Deprecated: Use GetHealthReportCleanUpFrequencySeconds instead
var HealthReportRecordStaleMinutes uint
Deprecated: Use GetHealthReportRecordStaleMinutes instead
var ServiceDiscoveryTimeoutSeconds uint
Deprecated: Use GetServiceDiscoveryTimeoutSeconds instead
Functions ¶
func BuildHealthPK ¶ added in v1.7.1
func BuildHealthPK() string
BuildHealthPK returns the fully-formed DynamoDB partition key for health status records. Exported so that gateway code uses the same key construction as model internals.
func BuildHealthSK ¶ added in v1.7.1
BuildHealthSK returns the fully-formed DynamoDB sort key for a given instanceId. Exported so that gateway code uses the same key construction as model internals.
func ConnectDataStore ¶
func DeleteInstanceHealthFromDataStore ¶ added in v1.0.8
func DeleteInstanceHealthFromDataStore(instanceKeys ...*dynamodb.DynamoDBTableKeyValue) (deleteFailKeys []*dynamodb.DynamoDBTableKeyValue, err error)
func GetDynamoDBActionRetryAttempts ¶ added in v1.7.0
func GetDynamoDBActionRetryAttempts() uint
GetDynamoDBActionRetryAttempts returns the configured retry attempts value
func GetGatewayKey ¶ added in v1.7.0
func GetGatewayKey() string
GetGatewayKey returns the configured gateway key
func GetHashKey ¶ added in v1.7.1
GetHashKey returns the hash secret for a given key name, and whether it was found
func GetHashKeys ¶ added in v1.7.0
GetHashKeys returns a copy of the hash keys map
func GetHashKeysCount ¶ added in v1.7.1
func GetHashKeysCount() int
GetHashKeysCount returns the number of hash keys configured
func GetHealthReportCleanUpFrequencySeconds ¶ added in v1.7.0
func GetHealthReportCleanUpFrequencySeconds() uint
GetHealthReportCleanUpFrequencySeconds returns the configured cleanup frequency
func GetHealthReportRecordStaleMinutes ¶ added in v1.7.0
func GetHealthReportRecordStaleMinutes() uint
GetHealthReportRecordStaleMinutes returns the configured stale minutes value
func GetInstanceHealthFromDataStore ¶ added in v1.0.8
func GetServiceDiscoveryTimeoutSeconds ¶ added in v1.7.0
func GetServiceDiscoveryTimeoutSeconds() uint
GetServiceDiscoveryTimeoutSeconds returns the configured timeout value
func SetDynamoDBActionRetryAttempts ¶ added in v1.7.0
func SetDynamoDBActionRetryAttempts(v uint)
SetDynamoDBActionRetryAttempts sets the retry attempts value
func SetGatewayKey ¶ added in v1.7.0
func SetGatewayKey(v string)
SetGatewayKey sets the gateway key
func SetHashKeys ¶ added in v1.7.0
SetHashKeys sets the hash keys map
func SetHealthReportCleanUpFrequencySeconds ¶ added in v1.7.0
func SetHealthReportCleanUpFrequencySeconds(v uint)
SetHealthReportCleanUpFrequencySeconds sets the cleanup frequency
func SetHealthReportRecordStaleMinutes ¶ added in v1.7.0
func SetHealthReportRecordStaleMinutes(v uint)
SetHealthReportRecordStaleMinutes sets the stale minutes value
func SetInstanceHealthToDataStore ¶ added in v1.0.8
func SetServiceDiscoveryTimeoutSeconds ¶ added in v1.7.0
func SetServiceDiscoveryTimeoutSeconds(v uint)
SetServiceDiscoveryTimeoutSeconds sets the timeout value
Types ¶
type HealthStatus ¶ added in v1.7.1
type HealthStatus struct {
PK string `json:"pk" dynamodbav:"PK"`
SK string `json:"sk" dynamodbav:"SK"`
NamespaceId string `json:"namespaceid" dynamodbav:"NamespaceId"`
ServiceId string `json:"serviceid" dynamodbav:"ServiceId"`
InstanceId string `json:"instanceid" dynamodbav:"InstanceId"`
AwsRegion string `json:"awsregion" dynamodbav:"AWSRegion"`
ServiceInfo string `json:"serviceinfo" dynamodbav:"ServiceInfo"`
HostInfo string `json:"hostinfo" dynamodbav:"HostInfo"`
LastTimestamp int64 `json:"lasttimestamp" dynamodbav:"LastTimestamp"`
LastUpdatedUTC string `json:"lastupdatedutc" dynamodbav:"LastUpdatedUTC"`
}
HealthStatus represents a service instance health record in DynamoDB
func ListInactiveInstancesFromDataStore ¶ added in v1.0.8
func ListInactiveInstancesFromDataStore() (inactiveInstances []*HealthStatus, err error)