start

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ExitFailed means the command could not run or a store could not be
	// checked or migrated: configuration, connection, lock or step failure.
	ExitFailed = 1
	// ExitUsage means invalid arguments; no store was opened.
	ExitUsage = 2
	// ExitPending means --check found steps pending.
	ExitPending = 10
	// ExitSchemaTooNew means a store was migrated by a newer binary.
	ExitSchemaTooNew = 11
	// ExitOlderOpener means --contract found a store opened by a binary that
	// lacks a pending contract step.
	ExitOlderOpener = 12
	// ExitIncompatible means `node peers --check` found a peer this binary cannot talk to.
	ExitIncompatible = 11
)

Exit codes of `node migrate` and `node peers --check`.

Variables

This section is empty.

Functions

func Cmd

func Cmd(n Node) *cobra.Command

Cmd returns the cobra command for Node

Types

type Configured added in v0.28.0

type Configured interface {
	Config() (driver.ConfigService, error)
}

Configured gives a command the node's configuration without installing any SDK.

type ExitError added in v0.28.0

type ExitError struct {
	Code int
	Err  error
}

ExitError is an error that sets the process exit code; node.Execute exits with Code.

func (*ExitError) Error added in v0.28.0

func (e *ExitError) Error() string

func (*ExitError) Unwrap added in v0.28.0

func (e *ExitError) Unwrap() error

type Migrator added in v0.28.0

type Migrator interface {
	Migrate(ctx context.Context, checkOnly bool) error
}

Migrator prepares the schema of every store a node opens, without starting the node.

type Node

type Node interface {
	ID() string
	Start() error
	Stop()
	Callback() chan<- error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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