discovery

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPublishPrefix   = "node.publish"
	DefaultDiscoveryPrefix = "node.discovery"

	DefaultLivecycle = 2 * time.Second
	DefaultExpire    = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	SaveAction   Action = "save"
	UpdateAction Action = "update"
	DeleteAction Action = "delete"
)

type Node

type Node struct {
	ID string
	//
	Component *module.Component //optional

	Module *module.ModuleVersion
	// How node looks like
	Graph *structpb.Struct
	// Realtime stats
	Stats       *structpb.Struct
	WorkspaceID string
	// which server is running the node
	ServerID string

	FlowID *string // optional
}

Node represents a node info

func (*Node) FullID

func (n *Node) FullID() string

FullID return the node id with scheme prefix

type NodeState

type NodeState int32

NodeState define the node state type

type Request

type Request struct {
	Action Action
	Node   Node
}

type Response

type Response struct {
	Success bool
	Reason  string
}

Jump to

Keyboard shortcuts

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