connection

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyFile is the full file name of the connection key.
	KeyFile = "conn.key"

	// PermConnKeyFile determines the default file permisssions for the connection
	// key file.
	PermConnKeyFile = os.FileMode(0700)
)

Variables

View Source
var (
	// ErrAbortDial is returned if either SIGINT or SIGTERM are fired into the quit
	// channel.
	ErrAbortDial = errors.New("dialing aborted")

	// RetryDialInterval is the interval in which SignCTRL tries to repeatedly dial
	// the validator. Initially set to 0, then set by retryDialX.
	// Make SignCTRL dial immediately the first time.
	RetryDialInterval = time.Duration(0)
)

Functions

func CreateBase64ConnKey

func CreateBase64ConnKey(cfgDir string) error

CreateBase64ConnKey creates a base64-encoded connection key.

func KeyFilePath

func KeyFilePath(cfgDir string) string

KeyFilePath returns the absolute path to the connection key file.

func LoadConnKey

func LoadConnKey(cfgDir string) (tm_ed25519.PrivKey, error)

LoadConnKey loads the connection key from the connection key file.

func RetryDial

func RetryDial(cfgDir, address string, logger *types.SyncLogger) (net.Conn, error)

RetryDial keeps dialing the given address until success and returns the connection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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