Documentation ¶
Index ¶
- Variables
- func FormatManageServiceURL(surl string, tlsEnabled bool) string
- func GenDNSName(svcMemberName string, domainName string) string
- func GenDefaultDomainName(clusterName string) string
- func GetDefaultControlDBAddr(cluster string) string
- func GetDefaultManageServiceDNSName(cluster string) string
- func GetDefaultManageServiceURL(cluster string, tlsEnabled bool) string
- func GetDomainNameFromDNSName(dnsname string) (string, error)
- func GetManageServiceURL(dnsname string, tlsEnabled bool) string
- func LookupHost(host string) (addr string, err error)
- func RegisterDNSName(ctx context.Context, domainName string, dnsName string, serverInfo server.Info, ...) error
- type DNS
- type MockDNS
- func (m *MockDNS) DeleteDNSRecord(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) error
- func (m *MockDNS) DeleteHostedZone(ctx context.Context, hostedZoneID string) error
- func (m *MockDNS) GetDNSRecord(ctx context.Context, dnsName string, hostedZoneID string) (hostIP string, err error)
- func (m *MockDNS) GetHostedZoneIDByName(ctx context.Context, domainName string, vpcID string, vpcRegion string, ...) (hostedZoneID string, err error)
- func (m *MockDNS) GetOrCreateHostedZoneIDByName(ctx context.Context, domainName string, vpcID string, vpcRegion string, ...) (hostedZoneID string, err error)
- func (m *MockDNS) LookupLocalDNS(ctx context.Context, dnsName string) (dnsIP string, err error)
- func (m *MockDNS) UpdateDNSRecord(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) error
- func (m *MockDNS) WaitDNSRecordUpdated(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) (dnsIP string, err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func FormatManageServiceURL ¶
FormatManageServiceURL formats the url to like https://firecamp-manageserver.cluster-firecamp.com:27040/
func GenDNSName ¶
GenDNSName generates the dns name for the service member
func GenDefaultDomainName ¶
GenDefaultDomainName generates the default domain name for the cluster example: cluster-firecamp.com
func GetDefaultControlDBAddr ¶
GetDefaultControlDBAddr returns the default controldb service address, example: firecamp-controldb.cluster-firecamp.com:27030
func GetDefaultManageServiceDNSName ¶
GetDefaultManageServiceDNSName returns the default management service dnsname. example: firecamp-manageserver.cluster-firecamp.com
func GetDefaultManageServiceURL ¶
GetDefaultManageServiceURL returns the default management service address. example: https://firecamp-manageserver.cluster-firecamp.com:27040/
func GetDomainNameFromDNSName ¶
GetDomainNameFromDNSName extracts the domain name from the dns name. example: aa1.test.com, return test.com
func GetManageServiceURL ¶
GetManageServiceURL returns the manage server url.
func LookupHost ¶
LookupHost looks up the given host using the local resolver.
Types ¶
type DNS ¶
type DNS interface { GetOrCreateHostedZoneIDByName(ctx context.Context, domainName string, vpcID string, vpcRegion string, private bool) (hostedZoneID string, err error) GetHostedZoneIDByName(ctx context.Context, domainName string, vpcID string, vpcRegion string, private bool) (hostedZoneID string, err error) DeleteHostedZone(ctx context.Context, hostedZoneID string) error // update the dnsName to point to hostIP in the hosted zone. // dnsName would be like db-0.domainName, hostIP is the IPv4 address. UpdateDNSRecord(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) error // Wait till dns record is updated to hostIP. WaitDNSRecordUpdated(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) (dnsIP string, err error) GetDNSRecord(ctx context.Context, dnsName string, hostedZoneID string) (hostIP string, err error) DeleteDNSRecord(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) error // LookupLocalDNS looks up the given host using the local resolver. LookupLocalDNS(ctx context.Context, dnsName string) (dnsIP string, err error) }
type MockDNS ¶
type MockDNS struct {
// contains filtered or unexported fields
}
func NewMockDNS ¶
func NewMockDNS() *MockDNS