defaultdomain

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedClient

type CachedClient struct {
	// contains filtered or unexported fields
}

CachedClient is a client that caches TLS certificates with automatic refresh

func NewCachedClient

func NewCachedClient(ctx context.Context, opts CachedClientOpts, logger logr.Logger) *CachedClient

NewCachedClient creates a new cached client with automatic refresh

func (*CachedClient) Close

func (c *CachedClient) Close()

Close stops the background refresh loop

func (*CachedClient) GetTLSCertificate

func (c *CachedClient) GetTLSCertificate(ctx context.Context) (*TLSCertificate, error)

GetTLSCertificate retrieves the cached TLS certificate or fetches a new one if expired

func (*CachedClient) IsHealthy

func (c *CachedClient) IsHealthy() bool

IsHealthy returns true if the client is healthy (has not exceeded max retries)

type CachedClientOpts

type CachedClientOpts struct {
	Opts
	SubscriptionID string
	ResourceGroup  string
	ClusterName    string
	CCPID          string
}

CachedClientOpts contains configuration options for the cached client

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a client for the default domain service

func NewClient

func NewClient(opts Opts) *Client

NewClient creates a new default domain client

func (*Client) GetTLSCertificate

func (c *Client) GetTLSCertificate(ctx context.Context, subscriptionID, resourceGroup, clusterName, ccpID string) (*TLSCertificate, error)

GetTLSCertificate retrieves a TLS certificate for the specified parameters

type Opts

type Opts struct {
	ServerAddress string
}

Opts contains configuration options for the client

type TLSCertificate

type TLSCertificate struct {
	// Key is the private key
	Key []byte `json:"key,omitempty"`
	// Cert is the certificate
	Cert []byte `json:"cert,omitempty"`
	// ExpiresOn is the expiration date of the certificate
	ExpiresOn *time.Time `json:"expires_on,omitempty"`
}

TLSCertificate represents a TLS certificate

Jump to

Keyboard shortcuts

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