state

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version = 1
)

Variables

View Source
var (
	ErrInvalidVersion = fmt.Errorf("invalid version number")
)

Functions

This section is empty.

Types

type Context

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

func (*Context) Clear

func (c *Context) Clear(key string) error

func (*Context) ClearAll

func (c *Context) ClearAll() error

ClearAll drops all associated keys

func (*Context) Ctx

func (c *Context) Ctx() context.Context

func (*Context) Get

func (c *Context) Get(key string) ([]byte, error)

func (*Context) Keys

func (c *Context) Keys() ([]string, error)

func (*Context) Service

func (c *Context) Service(service string) restate.Service

func (*Context) Set

func (c *Context) Set(key string, value []byte) error

func (*Context) SideEffect

func (c *Context) SideEffect(fn func() ([]byte, error), bo ...backoff.BackOff) ([]byte, error)

func (*Context) Sleep

func (c *Context) Sleep(until time.Time) error

type Machine

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

func NewMachine

func NewMachine(handler restate.Handler, conn io.ReadWriter) *Machine

func (*Machine) Start

func (m *Machine) Start(inner context.Context, trace string) error

Start starts the state machine

Jump to

Keyboard shortcuts

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