node

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type End

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

End terminates the conversation early.

func NewEnd

func NewEnd(reason string) *End

NewEnd creates an End node with an optional reason.

func (*End) Execute

func (n *End) Execute(ctx *ork.Context) error

Execute implements ork.Node.

type HTTP

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

HTTP makes an outbound HTTP request and stores the response directly in Vars.

func NewHTTP

func NewHTTP(cfg HTTPConfig) *HTTP

NewHTTP creates a new HTTP node.

func (*HTTP) Execute

func (n *HTTP) Execute(ctx *ork.Context) error

Execute implements ork.Node.

func (*HTTP) Initialize

func (n *HTTP) Initialize() error

Initialize implements ork.NodeInitializer.

type HTTPConfig

type HTTPConfig struct {
	Method     string
	URL        string
	Body       string
	Headers    map[string]string
	Timeout    time.Duration
	MaxRetries int
	Client     HTTPDoer
}

HTTPConfig defines the configuration for making HTTP requests.

type HTTPDoer

type HTTPDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPDoer is an HTTP client interface abstraction to ease testing.

type Message

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

Message renders a pre-compiled text/template and emits the result.

func NewMessage

func NewMessage(tmplStr string) *Message

NewMessage creates a Message node and pre-compiles its template.

func (*Message) Execute

func (n *Message) Execute(ctx *ork.Context) error

Execute implements ork.Node.

func (*Message) Initialize

func (n *Message) Initialize() error

Initialize implements ork.NodeInitializer.

Jump to

Keyboard shortcuts

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