MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / GetHostName

Function GetHostName

tests/utils/services/service.go:81–92  ·  view source on GitHub ↗

GetHostName return fully qualified domain name for read write service

(
	ctx context.Context,
	crudClient client.Client,
	namespace, clusterName string,
)

Source from the content-addressed store, hash-verified

79
80// GetHostName return fully qualified domain name for read write service
81func GetHostName(
82 ctx context.Context,
83 crudClient client.Client,
84 namespace, clusterName string,
85) (string, error) {
86 rwService, err := getRwServiceObject(ctx, crudClient, namespace, clusterName)
87 if err != nil {
88 return "", err
89 }
90 host := CreateServiceFQDN(namespace, rwService.GetName())
91 return host, nil
92}

Callers 2

ImportDatabasesMonolithFunction · 0.92

Calls 3

getRwServiceObjectFunction · 0.85
CreateServiceFQDNFunction · 0.85
GetNameMethod · 0.65

Tested by

no test coverage detected