placement

package
v1.16.20 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TablesWithHost

func TablesWithHost(host *v1pb.Host, version string, actorTypes ...string) *v1pb.PlacementTables

TablesWithHost returns placement tables which place every given actor type on the given host.

Types

type Placement

type Placement struct {
	*procgrpc.GRPC
	v1pb.UnimplementedPlacementServer
	// contains filtered or unexported fields
}

Placement is a scripted fake Placement server which sends lock, update, and unlock orders exactly when the test tells it to, so tests can produce order sequences the real Placement server only emits under churn.

func New

func New(t *testing.T) *Placement

func (*Placement) ReportDaprStatus

func (p *Placement) ReportDaprStatus(stream v1pb.Placement_ReportDaprStatusServer) error

func (*Placement) SendOrder

func (p *Placement) SendOrder(t *testing.T, ctx context.Context, operation string, tables *v1pb.PlacementTables)

SendOrder sends a placement order to the connected daprd stream.

func (*Placement) WaitForRegistration

func (p *Placement) WaitForRegistration(t *testing.T, ctx context.Context) *v1pb.Host

WaitForRegistration returns the first Host report received on the next daprd stream connecting to this fake Placement server. Call it again after forcing a stream reset to observe the reconnection.

Jump to

Keyboard shortcuts

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