futures

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AWAKEABLE_IDENTIFIER_PREFIX = "prom_1"

Variables

This section is empty.

Functions

This section is empty.

Types

type After

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

func NewAfter

func NewAfter(suspensionCtx context.Context, entry *wire.SleepEntryMessage, entryIndex uint32) *After

func (*After) Done

func (a *After) Done() error

type Awakeable

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

func NewAwakeable

func NewAwakeable(suspensionCtx context.Context, invocationID []byte, entry *wire.AwakeableEntryMessage, entryIndex uint32) *Awakeable

func (*Awakeable) Id

func (c *Awakeable) Id() string

func (*Awakeable) Result

func (c *Awakeable) Result() ([]byte, error)

type Promise added in v0.12.0

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

func NewPromise added in v0.12.0

func NewPromise(suspensionCtx context.Context, invocationID []byte, getPromise func() (*wire.GetPromiseEntryMessage, uint32)) *Promise

func (*Promise) Result added in v0.12.0

func (c *Promise) Result() ([]byte, error)

type ResponseFuture

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

func NewResponseFuture

func NewResponseFuture(suspensionCtx context.Context, entry *wire.CallEntryMessage, entryIndex uint32, newProtocolViolation func(error) any) *ResponseFuture

func (*ResponseFuture) Response

func (r *ResponseFuture) Response() ([]byte, error)

type Selectable

type Selectable interface {
	// contains filtered or unexported methods
}

type Selector

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

func Select

func Select(suspensionCtx context.Context, futs ...Selectable) *Selector

func (*Selector) Indexes

func (s *Selector) Indexes() []uint32

func (*Selector) Remaining

func (s *Selector) Remaining() bool

func (*Selector) Select

func (s *Selector) Select() (uint32, bool)

func (*Selector) Take

func (s *Selector) Take(winningEntryIndex uint32) Selectable

Jump to

Keyboard shortcuts

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