fx

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Effect

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

Effect is either an invocation or a link to one.

func FromInvocation

func FromInvocation(invocation invocation.Invocation) Effect
func FromLink(link ucan.Link) Effect

func (Effect) Invocation

func (e Effect) Invocation() (invocation.Invocation, bool)

Invocation returns the invocation if it is available.

func (e Effect) Link() ucan.Link

Link returns the invocation root link.

type Effects

type Effects interface {
	Fork() []Effect
	Join() Effect
}

func NewEffects

func NewEffects(opts ...Option) Effects

type Option

type Option func(fx *effects) error

Option is an option configuring effects.

func WithFork

func WithFork(forks ...Effect) Option

WithFork configures the forks for the receipt.

func WithJoin

func WithJoin(join Effect) Option

WithJoin configures the join for the receipt.

Jump to

Keyboard shortcuts

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