embed

package
v0.3.4 Latest Latest
Warning

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

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

Documentation

Overview

Package embed provides a simplified way to run a webmesh node in-process. This will hopefully be completed soon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node interface {
	// Start starts the node.
	Start(ctx context.Context) error
	// Stop stops the node.
	Stop(ctx context.Context) error
	// Errors returns a channel of errors that occur during
	// the lifetime of the node. At the moment, any error is
	// fatal and will cause the node to stop.
	Errors() <-chan error
	// Mesh returns the underlying mesh instance.
	Mesh() mesh.Mesh
	// Raft is the underlying Raft instance.
	Raft() raft.Raft
	// Storage is the underlying storage instance.
	Storage() storage.MeshStorage
	// Services returns the underlying services instance
	// if it is running.
	Services() *services.Server
	// MeshDNS returns the underlying MeshDNS instance
	// if it is running.
	MeshDNS() *meshdns.Server
}

Node is an embedded webmesh node.

func NewNode

func NewNode(ctx context.Context, config *config.Config) (Node, error)

NewNode creates a new embedded webmesh node.

Jump to

Keyboard shortcuts

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