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) 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 (*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
Click to show internal directories.
Click to hide internal directories.