status

package
v0.19.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OnlineIcon   = "🟢"
	OnlineStatus = "ONLINE"

	OfflineIcon   = "🔴"
	OfflineStatus = "OFFLINE"
)

Variables

View Source
var Command = &command.Command{
	Cmd: &cobra.Command{
		Use:   "status",
		Short: "Display the status of the Flow network",
	},
	Flags: &statusFlags,
	Run: func(
		cmd *cobra.Command,
		args []string,
		globalFlags command.GlobalFlags,
		services *services.Services,
	) (command.Result, error) {
		accessNode, err := services.Status.Ping(globalFlags.Network)

		return &Result{
			network:    globalFlags.Network,
			accessNode: accessNode,
			err:        err,
		}, nil
	},
}

Functions

This section is empty.

Types

type FlagsStatus

type FlagsStatus struct {
}

type Result

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

func (*Result) JSON

func (r *Result) JSON() interface{}

JSON converts result to a JSON.

func (*Result) Oneliner

func (r *Result) Oneliner() string

Oneliner returns result as one liner grep friendly.

func (*Result) String

func (r *Result) String() string

String converts result to a string.

Jump to

Keyboard shortcuts

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