restate

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package restate provides Restate options for agent.NewAgent.

Import this package (and use WithRestateConfig) only when the app needs Restate. Apps that use the local runtime should not import it, so github.com/restatedev/sdk-go (and wazero) stay out of the binary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRestateConfig

func WithRestateConfig(cfg *RestateConfig) agent.Option

WithRestateConfig selects the Restate execution runtime (ingress + embedded SDK endpoint). Mutually exclusive with Temporal options from pkg/agent/runtime/temporal.

Types

type EndpointConfig

type EndpointConfig = restate_runtime.EndpointConfig

EndpointConfig is where this process serves AgentLoop for Restate to call into (listen address, optional admin registration, deployment callback URL).

type EventLogConfig

type EventLogConfig = restate_runtime.EventLogConfig

EventLogConfig controls post-run cleanup of the per-run AgentEventLog virtual object.

Zero value enables cleanup with a 90s delay before Clear. Set DisableClear to skip Clear entirely (handy for CLI examples). Set TTL to override the delay when cleanup is enabled.

type IngressConfig

type IngressConfig = restate_runtime.IngressConfig

IngressConfig is how the agent invokes Restate (Run/Stream/Cancel, awakeables).

type RestateConfig

type RestateConfig = restate_runtime.RestateConfig

RestateConfig holds connection and endpoint settings for the Restate execution runtime.

Typical usage:

restate.WithRestateConfig(&restate.RestateConfig{
	Ingress:  restate.IngressConfig{URL: "http://localhost:8080"},
	Endpoint: restate.EndpointConfig{ListenAddress: ":9080", AdminURL: "http://localhost:9070"},
	EventLog: restate.EventLogConfig{}, // cleanup on, 90s TTL (defaults)
})

For short-lived examples that exit before delayed Clear can run, disable cleanup:

EventLog: restate.EventLogConfig{DisableClear: true}

Jump to

Keyboard shortcuts

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