Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TempDir ¶
TempDir creates a temporary directory within tmpdir with the name 'testname-name'. If the directory cannot be created t.Fatal is called. The directory will be removed when the test ends. Set TEST_NOCLEANUP env var to prevent the directory from being removed.
func TempFile ¶
TempFile creates a temporary file within tmpdir with the name 'testname-name'. If the file cannot be created t.Fatal is called. If a temporary directory has been created before consider storing the file inside this directory to avoid double cleanup. The file will be removed when the test ends. Set TEST_NOCLEANUP env var to prevent the file from being removed.
Types ¶
type CertificateWatcher ¶
type CertificateWatcher struct {
// contains filtered or unexported fields
}
func NewCertificateWatcher ¶
func (*CertificateWatcher) GetCertificateFunc ¶
func (w *CertificateWatcher) GetCertificateFunc() func(*tls.ClientHelloInfo) (*tls.Certificate, error)
func (*CertificateWatcher) Start ¶
func (w *CertificateWatcher) Start(ctx context.Context) (func(), error)
func (*CertificateWatcher) Stop ¶
func (w *CertificateWatcher) Stop() error
type FileWatcherEvent ¶
type FileWatcherEvent struct {
Filenames []string
}
type Watcher ¶
type Watcher interface { Start(ctx context.Context) Stop() error Add(filename string) error Remove(filename string) Replace(oldFile, newFile string) error EventsCh() chan *FileWatcherEvent }
func NewFileWatcher ¶
NewFileWatcher create a file watcher that will watch all the files/folders from configFiles if success a fileWatcher will be returned and a nil error otherwise an error and a nil fileWatcher are returned