nodecmd

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package nodecmd contains the entrypoint for webmesh nodes.

Package nodecmd contains the entrypoint for webmesh nodes.

Package nodecmd contains the entrypoint for webmesh nodes.

Package nodecmd contains the entrypoint for webmesh nodes.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotConnected is returned when the node is not connected to the mesh.
	ErrNotConnected = status.Errorf(codes.FailedPrecondition, "not connected")
	// ErrAlreadyConnected is returned when the node is already connected to the mesh.
	ErrAlreadyConnected = status.Errorf(codes.FailedPrecondition, "already connected")
	// ErrAlreadyConnecting is returned when the node is already connecting to the mesh.
	ErrAlreadyConnecting = status.Errorf(codes.FailedPrecondition, "already connecting")
)

Functions

func DefaultDaemonSocket added in v0.1.13

func DefaultDaemonSocket() string

DefaultDaemonSocket returns the default daemon socket path.

func Execute

func Execute() error

func GenBridgeMarkdownDoc added in v0.1.3

func GenBridgeMarkdownDoc(title string, weight int, outfile string) error

GenBridgeMarkdownDoc generates the markdown documentation for the bridge commands.

func GenMarkdownDoc added in v0.0.25

func GenMarkdownDoc(title string, weight int, outfile string) error

GenMarkdownDoc generates markdown documentation for the node command

func RunAppDaemon added in v0.1.13

func RunAppDaemon(ctx context.Context, config *Options) error

RunAppDaemon runs the app daemon.

Types

type AppDaemon added in v0.1.13

type AppDaemon struct {
	v1.UnimplementedAppDaemonServer
	// contains filtered or unexported fields
}

AppDaemon is the app daemon RPC server.

func (*AppDaemon) Connect added in v0.1.13

func (app *AppDaemon) Connect(ctx context.Context, req *v1.ConnectRequest) (*v1.ConnectResponse, error)

func (*AppDaemon) Disconnect added in v0.1.13

func (app *AppDaemon) Disconnect(ctx context.Context, _ *v1.DisconnectRequest) (*v1.DisconnectResponse, error)

func (*AppDaemon) LeaveCampfire added in v0.1.13

func (app *AppDaemon) LeaveCampfire(ctx context.Context, req *v1.LeaveCampfireRequest) (*v1.LeaveCampfireResponse, error)

func (*AppDaemon) Metrics added in v0.1.13

func (app *AppDaemon) Metrics(ctx context.Context, _ *v1.MetricsRequest) (*v1.MetricsResponse, error)

func (*AppDaemon) Publish added in v0.2.0

func (app *AppDaemon) Publish(ctx context.Context, req *v1.PublishRequest) (*emptypb.Empty, error)

func (*AppDaemon) Query added in v0.1.13

func (app *AppDaemon) Query(req *v1.QueryRequest, stream v1.AppDaemon_QueryServer) error

func (*AppDaemon) StartCampfire added in v0.1.13

func (app *AppDaemon) StartCampfire(ctx context.Context, req *v1.StartCampfireRequest) (*v1.StartCampfireResponse, error)

func (*AppDaemon) Status added in v0.2.0

func (app *AppDaemon) Status(ctx context.Context, _ *v1.StatusRequest) (*v1.StatusResponse, error)

func (*AppDaemon) Subscribe added in v0.2.0

func (app *AppDaemon) Subscribe(req *v1.SubscribeRequest, srv v1.AppDaemon_SubscribeServer) error

type Options

type Options struct {
	Global *global.Options `yaml:"global,omitempty" json:"global,omitempty" toml:"global,omitempty" mapstructure:"global,omitempty"`

	Mesh     *mesh.Options       `yaml:",inline" json:",inline" toml:",inline" mapstructure:",squash"`
	Bridge   *meshbridge.Options `yaml:"bridge,omitempty" json:"bridge,omitempty" toml:"bridge,omitempty" mapstructure:"bridge,omitempty"`
	Services *services.Options   `yaml:"services,omitempty" json:"services,omitempty" toml:"services,omitempty" mapstructure:"services,omitempty"`
}

Options are the node options.

func NewOptions

func NewOptions() *Options

NewOptions creates new options.

func (*Options) BindFlags

func (o *Options) BindFlags(fs *flag.FlagSet) *Options

BindFlags binds the flags. The options are returned for convenience.

func (*Options) DeepCopy added in v0.1.13

func (o *Options) DeepCopy() *Options

DeepCopy returns a deep copy of the options.

func (*Options) Marshal

func (o *Options) Marshal() ([]byte, error)

Marshal returns the marshaled options.

func (*Options) MarshalTo

func (o *Options) MarshalTo(w io.Writer) error

func (*Options) Validate added in v0.1.2

func (o *Options) Validate() error

Validate runs all the validation checks.

Directories

Path Synopsis
Package global provides global configurations that can override others.
Package global provides global configurations that can override others.

Jump to

Keyboard shortcuts

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