renewal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package renewal provides operator client certificate renewal logic for long-running processes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context, cfg Config)

Start begins the certificate renewal goroutine. It renews at 50% of remaining certificate lifetime, then exits the process.

Types

type CertificateStore

type CertificateStore interface {
	StoreCertificate(ctx context.Context, certPEM []byte) error
}

CertificateStore stores renewed certificates.

type Config

type Config struct {
	CurrentCert *x509.Certificate
	PrivateKey  ed25519.PrivateKey
	Store       CertificateStore
	Connections ConnectionProvider
	Logger      *slog.Logger
}

Config holds the configuration for certificate renewal.

type ConnectionProvider

type ConnectionProvider interface {
	// GetConnection returns a gRPC connection to any available shard.
	// It may establish a new connection or return an existing one.
	GetConnection(ctx context.Context) (conn *grpc.ClientConn, shard string, err error)
}

ConnectionProvider provides a gRPC connection to a shard for renewal.

Jump to

Keyboard shortcuts

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