hostname

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package hostname implements hostname resolving strategies.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OwnerChainResolver

type OwnerChainResolver struct {
	client.Client
	Chain []metav1.GroupKind
}

OwnerChainResolver traverses the owner chain and uses the name of the last owner reference as the hostname.

func (*OwnerChainResolver) GetHostname

func (r *OwnerChainResolver) GetHostname(ctx context.Context, claim *ipamv1.IPAddressClaim) (string, error)

GetHostname returns the hostname for the specified claim.

type Resolver

type Resolver interface {
	GetHostname(context.Context, *ipamv1.IPAddressClaim) (string, error)
}

Resolver is an interface used to get hostname of the machine.

type SearchOwnerReferenceResolver

type SearchOwnerReferenceResolver struct {
	client.Client
	MaxDepth  int
	SearchFor metav1.GroupKind
}

SearchOwnerReferenceResolver performs a depth search on the owner references until it finds the specified metav1.GroupKind and uses it's name as the hostname.

func (*SearchOwnerReferenceResolver) GetHostname

GetHostname returns the hostname for the specified claim.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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