Help us shape the future of Go! Take the 2026 Go Developer Survey

actors

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SchedulerPlacementFromEnv added in v1.19.0

func SchedulerPlacementFromEnv() bool

SchedulerPlacementFromEnv reports whether DAPR_INTEGRATION_SCHEDULER_PLACEMENT is set truthy, which has the scheduler serve actor placement for every harness built by this package.

Types

type Actors

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

func New

func New(t *testing.T, fopts ...Option) *Actors

func (*Actors) AppID

func (a *Actors) AppID() string

func (*Actors) Cleanup

func (a *Actors) Cleanup(t *testing.T)

func (*Actors) DB

func (a *Actors) DB() *sqlite.SQLite

func (*Actors) Daprd

func (a *Actors) Daprd() *daprd.Daprd

func (*Actors) GRPCClient

func (a *Actors) GRPCClient(t *testing.T, ctx context.Context) rtv1.DaprClient

func (*Actors) GRPCConn

func (a *Actors) GRPCConn(t *testing.T, ctx context.Context) *grpc.ClientConn

func (*Actors) Metrics

func (a *Actors) Metrics(t *testing.T, ctx context.Context) map[string]float64

func (*Actors) Placement

func (a *Actors) Placement() *placement.Placement

Placement returns the standalone placement process. Nil when the actors were built with WithSchedulerPlacement, which runs no placement process.

func (*Actors) PlacementTables added in v1.19.0

func (a *Actors) PlacementTables(t *testing.T, ctx context.Context) *placement.TableState

PlacementTables returns the placement table state of the active placement authority. Under scheduler placement the state is read with a one-off typeless report stream, whose snapshot carries every table of the default namespace without joining any of them: Version is the scheduler's dissemination count, which advances when any table changes and holds still otherwise, and APIVLevel carries the fixed level every current daprd reports.

func (*Actors) Run

func (a *Actors) Run(t *testing.T, ctx context.Context)

func (*Actors) Scheduler

func (a *Actors) Scheduler() *scheduler.Scheduler

func (*Actors) WaitUntilRunning

func (a *Actors) WaitUntilRunning(t *testing.T, ctx context.Context)

type EntityConfig

type EntityConfig func(*entityConfig)

func WithEntityConfigActorIdleTimeout

func WithEntityConfigActorIdleTimeout(timeout time.Duration) EntityConfig

func WithEntityConfigDrainOngoingCallTimeout

func WithEntityConfigDrainOngoingCallTimeout(timeout time.Duration) EntityConfig

func WithEntityConfigEntities

func WithEntityConfigEntities(entities ...string) EntityConfig

func WithEntityConfigReentrancy

func WithEntityConfigReentrancy(enabled bool, maxDepth *uint32) EntityConfig

type Option

type Option func(*options)

func WithActorIdleTimeout

func WithActorIdleTimeout(timeout time.Duration) Option

func WithActorTypeHandler

func WithActorTypeHandler(actorType string, handler http.HandlerFunc) Option

func WithActorTypes

func WithActorTypes(types ...string) Option

func WithDB

func WithDB(db *sqlite.SQLite) Option

func WithDaprdOptions added in v1.17.7

func WithDaprdOptions(dopts ...daprd.Option) Option

WithDaprdOptions appends additional daprd options applied when building the underlying daprd process.

func WithDrainOngoingCallTimeout added in v1.17.0

func WithDrainOngoingCallTimeout(timeout time.Duration) Option

func WithDrainRebalancedActors added in v1.17.0

func WithDrainRebalancedActors(drain bool) Option

func WithEntityConfig

func WithEntityConfig(opts ...EntityConfig) Option

func WithHandler

func WithHandler(pattern string, handler http.HandlerFunc) Option

func WithMaxBodySize added in v1.15.1

func WithMaxBodySize(size string) Option

func WithPeerActor

func WithPeerActor(actor *Actors) Option

func WithPlacement

func WithPlacement(placement *placement.Placement) Option

func WithPlacementService added in v1.19.0

func WithPlacementService() Option

WithPlacementService pins actor placement to the placement service, overriding DAPR_INTEGRATION_SCHEDULER_PLACEMENT.

func WithReentry

func WithReentry(enabled bool) Option

func WithReentryMaxDepth

func WithReentryMaxDepth(maxDepth uint32) Option

func WithResources

func WithResources(resources ...string) Option

func WithScheduler

func WithScheduler(scheduler *scheduler.Scheduler) Option

func WithSchedulerPlacement added in v1.19.0

func WithSchedulerPlacement() Option

WithSchedulerPlacement serves actor placement from the scheduler instead of the standalone placement service: no placement process is started and the scheduler runs with placement enabled. Sidecars need no configuration of their own and take the scheduler's advertisement.

func WithSharedControlPlane added in v1.18.0

func WithSharedControlPlane() Option

Jump to

Keyboard shortcuts

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