watcher

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileWatcher

type FileWatcher struct {
	// contains filtered or unexported fields
}

FileWatcher watches for changes to the file and calls the waiter's Update method.

func New

func New(log *logger.Logger, updater updater) (*FileWatcher, error)

New creates a new FileWatcher for the given validator.

func (*FileWatcher) Close

func (f *FileWatcher) Close() error

Close closes the watcher. It should only be called once.

func (*FileWatcher) Watch

func (f *FileWatcher) Watch(file string) error

Watch starts watching the file at the given path. It will call the watcher's Update method when the file is modified.

type Updatable

type Updatable struct {
	atls.Validator
	// contains filtered or unexported fields
}

Updatable implements an updatable atls.Validator.

func NewValidator

func NewValidator(log *logger.Logger, csp string, fileHandler file.Handler, azureCVM bool) (*Updatable, error)

NewValidator initializes a new updatable validator.

func (*Updatable) OID

func (u *Updatable) OID() asn1.ObjectIdentifier

OID returns the validators Object Identifier.

func (*Updatable) Update

func (u *Updatable) Update() error

Update switches out the underlying validator.

func (*Updatable) Validate

func (u *Updatable) Validate(attDoc []byte, nonce []byte) ([]byte, error)

Validate calls the validators Validate method, and prevents any updates during the call.

Jump to

Keyboard shortcuts

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