startupcheck

package
v1.90.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Error is a class of startup check errors.
	Error = errs.Class("startup check")
)

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Infof(template string, args ...interface{})
	Errorf(template string, args ...interface{})
}

Logger is for logging startup checks.

type NodeURLCheck

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

NodeURLCheck checks for node URL connectivity.

func NewNodeURLCheck

func NewNodeURLCheck(config NodeURLCheckConfig) (c *NodeURLCheck, err error)

NewNodeURLCheck returns a new NodeURLCheck.

func (*NodeURLCheck) Check

func (c *NodeURLCheck) Check(ctx context.Context) (err error)

Check runs the check.

type NodeURLCheckConfig

type NodeURLCheckConfig struct {
	// NodeURLs is a list of node URLs that we must be able to establish a
	// connection to. It can be made up of any of the following:
	//   - A URL that responds with node IDs newline separated.
	//     e.g. https://www.storj.io/dcs-satellites
	//   - A local file path containing node IDs newline separated.
	//     e.g. /path/to/my/satellites.txt
	//   - Individual satellite node URLs.
	//     e.g. 12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S@us1.storj.io:7777
	NodeURLs []string

	// Logger is an optional logger to log check information.
	Logger Logger

	// Timeout is how long checks can run before canceling.
	Timeout time.Duration

	// IdentityConfig is used for node verification. If not given, a new identity
	// with low difficulty is generated instead.
	IdentityConfig identity.Config
}

NodeURLCheckConfig configures NodeURLCheck.

Jump to

Keyboard shortcuts

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