Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNamesFromConfig ¶
func GetNamesFromConfig( keyPairs []*configpb.KeyPair, routes []*configpb.Route, settings []*configpb.Settings, ) (certificateNames []string, routeNames []string)
GetNamesFromConfig gets all the certificate and route host names from config.
func IterateServerCertificatesFromPEM ¶
func IterateServerCertificatesFromPEM(data []byte) iter.Seq[*x509.Certificate]
IterateServerCertificatesFromPEM iterates all of the server certificates found in raw PEM data.
Types ¶
type Matcher ¶
type Matcher[Key comparable] interface { // MissingNames returns any route "from" hostnames which don't have // a matching certificate. MissingNames() []string Update(key Key, certificateNames []string, routeNames []string) }
A Matcher matches routes with certificate names.
type NameIndex ¶
type NameIndex[Key comparable] interface { // Add adds all the names to the index for the given key. Multiple // keys can be associated with the same names. Add(key Key, names []string) // Get returns all the names for the given key. Get(key Key) []string // Keys returns all the known keys. Order is non-deterministic. Keys() []Key // Lookup looks up any keys associated with the given name. Wildcard search // is supported (Lookup("*.example.com") -> would match a key for // "www.example.com"). Order is non-deterministic. Lookup(name string, allowWildcard bool) []Key // Names returns all the known names. Order is non-deterministic. Names() []string // Remove removes a key from the index and possibly all of its associated // names if they aren't referenced by any other keys. Remove(key Key) }
NameIndex is used to index certificate DNS names. It supports exact and wildcard matching and dynamic updates.
func NewNameIndex ¶
func NewNameIndex[Key comparable]() NameIndex[Key]
NewNameIndex creates a new NameIndex for the given key type. The NameIndex is not safe for concurrent use.
Click to show internal directories.
Click to hide internal directories.