Documentation ¶
Index ¶
- func CheckUntilTimeout(ctx context.Context, interval time.Duration, check func() bool) bool
- func CheckUntilTimeoutWithErr(ctx context.Context, interval time.Duration, check func() (bool, error)) (bool, error)
- func GenerateCA(name, commonName string) (string, string, error)
- func GenerateCert(name, commonName string, dnsNames, nodeIDs []string) (string, string, error)
- func GenerateCertWithCA(name, caKeyPath, caCrtPath, commonName string, dnsNames, nodeIDs []string) (string, string, error)
- func GenerateRSAPair() (string, string, error)
- func GetFreeTCPPort() (int, error)
- type TestLogWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUntilTimeout ¶
CheckUntilTimeout Polls the check function until the context expires, in which case it returns false.
func CheckUntilTimeoutWithErr ¶
func CheckUntilTimeoutWithErr(ctx context.Context, interval time.Duration, check func() (bool, error)) (bool, error)
CheckUntilTimeoutWithErr does the same as CheckUntilTimeout but requires the check function returns (bool, error), and will return an error immediately if the check function returns an error.
func GenerateCA ¶
GenerateCA generates a CA certificate and key.
func GenerateCert ¶
GenerateCert generates a private and public key for testing in the directory specified.
func GenerateCertWithCA ¶
func GenerateCertWithCA(name, caKeyPath, caCrtPath, commonName string, dnsNames, nodeIDs []string) (string, string, error)
GenerateCertWithCA generates a private and public key for testing in the directory specified using the ca specified.
func GenerateRSAPair ¶
func GetFreeTCPPort ¶
Types ¶
type TestLogWriter ¶
testLogWriter provides a threadsafe way of reading and writing logs to a buffer.
func NewTestLogWriter ¶
func NewTestLogWriter() *TestLogWriter
func (*TestLogWriter) String ¶
func (lw *TestLogWriter) String() string
Click to show internal directories.
Click to hide internal directories.