Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaminoCertProvider ¶
type CaminoCertProvider interface { // GetCertAndKey generates a cert and accompanying private key // Returns: // certPemBytes: The bytes of the generated cert // keyPemBytes: The bytes of the private key generated with the cert GetCertAndKey() (certPemBytes bytes.Buffer, keyPemBytes bytes.Buffer, err error) }
CaminoCertProvider defines an interface representing a cert provider for an Camino service (used in the duplicate node ID test, which requires that multiple Camino services start with the same cert)
type RandomCaminoCertProvider ¶
type RandomCaminoCertProvider struct {
// contains filtered or unexported fields
}
RandomCaminoCertProvider implements CaminoCertProviders by providing certs signed by the same root CA
func NewRandomCaminoCertProvider ¶
func NewRandomCaminoCertProvider(varyCerts bool) *RandomCaminoCertProvider
NewRandomCaminoCertProvider creates a new cert provider that can optionally return either the same cert every time, or different ones Args:
varyCerts: True to produce a different cert on each call to GetCertAndKey, or false to yield the same randomly-generated cert each time
func (*RandomCaminoCertProvider) GetCertAndKey ¶
func (r *RandomCaminoCertProvider) GetCertAndKey() (certPemBytes bytes.Buffer, keyPemBytes bytes.Buffer, err error)
GetCertAndKey implements CaminoCertProvider function that yields a new cert and private key based off the configuration parameters defined at construction time Returns:
certPemBytes: The bytes of the generated cert keyPemBytes: The bytes of the private key that was generated alongside the cert
type StaticCaminoCertProvider ¶
type StaticCaminoCertProvider struct {
// contains filtered or unexported fields
}
StaticCaminoCertProvider implements CaminoCertProvider and provides the same cert every time
func NewStaticCaminoCertProvider ¶
func NewStaticCaminoCertProvider(key bytes.Buffer, cert bytes.Buffer) *StaticCaminoCertProvider
NewStaticCaminoCertProvider creates an instance of StaticCaminoCertProvider using the given key and cert Args:
key: The private key that the StaticCaminoCertProvider will return on every call to GetCertAndKey cert: The cert that will be returned on every call to GetCertAndKey
func (StaticCaminoCertProvider) GetCertAndKey ¶
func (s StaticCaminoCertProvider) GetCertAndKey() (certPemBytes bytes.Buffer, keyPemBytes bytes.Buffer, err error)
GetCertAndKey returns the same cert and key that was configured at the time of construction