tbus

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TopicBinding

type TopicBinding struct {
	Topic string
}

TopicBinding routes an internal memory event to an action.

func Topic

func Topic(topic string) TopicBinding

Topic binds an action to an in-process pub/sub topic.

func (TopicBinding) String

func (b TopicBinding) String() string

type Transport

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

Transport bridges the internal Nexss Bus to the Action execution engine.

func New

func New(eventBus *bus.Bus[any]) *Transport

New creates a new internal bus transport.

func (*Transport) CanHandle

func (t *Transport) CanHandle(b action.Binding) bool

func (*Transport) Do

func (t *Transport) Do(ctx context.Context, _ any) (any, error)

Do implements the Transport interface. It just blocks since the bus is in-memory.

func (*Transport) Mount

func (t *Transport) Mount(actions []action.AnyAction)

Mount scans actions for tbus.Topic bindings and subscribes them to the internal bus.

func (*Transport) Publish

func (t *Transport) Publish(ctx context.Context, topic string, payload any) error

Publish is a convenience wrapper to emit events to the internal bus.

func (*Transport) String

func (t *Transport) String() string

Jump to

Keyboard shortcuts

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