watcher

package
v0.0.0-...-18b16e6 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFetchMetadataFailed  = errors.New("failed to fetch rmetadata")
	ErrNoRegisteredActioner = errors.New("no registered actioners")
)

Possible Errors

Functions

This section is empty.

Types

type Conf

type Conf struct {
	SSHPort int
}

Conf contains configurations for a watcher

type MetadataWatcher

type MetadataWatcher interface {
	RegisterActioner(actioner actioner.MetadataActioner)
	Run() error
	Shutdown()
}

MetadataWatcher watches for metadata changes of the given droplet, It notifies every registered actioner when it detects any metadata changes.

func NewSSHWatcher

func NewSSHWatcher(cfg *Conf) MetadataWatcher

NewSSHWatcher creates a new metadata watcher that is based on watching port knocking messages on port 22

func NewWebBasedWatcher

func NewWebBasedWatcher(_ *Conf) MetadataWatcher

NewWebBasedWatcher creates a new metadata watcher that is based on a webserver

Jump to

Keyboard shortcuts

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