Documentation
¶
Index ¶
- func SchedulerPlacementFromEnv() bool
- type Actors
- func (a *Actors) AppID() string
- func (a *Actors) Cleanup(t *testing.T)
- func (a *Actors) DB() *sqlite.SQLite
- func (a *Actors) Daprd() *daprd.Daprd
- func (a *Actors) GRPCClient(t *testing.T, ctx context.Context) rtv1.DaprClient
- func (a *Actors) GRPCConn(t *testing.T, ctx context.Context) *grpc.ClientConn
- func (a *Actors) Metrics(t *testing.T, ctx context.Context) map[string]float64
- func (a *Actors) Placement() *placement.Placement
- func (a *Actors) PlacementTables(t *testing.T, ctx context.Context) *placement.TableState
- func (a *Actors) Run(t *testing.T, ctx context.Context)
- func (a *Actors) Scheduler() *scheduler.Scheduler
- func (a *Actors) WaitUntilRunning(t *testing.T, ctx context.Context)
- type EntityConfig
- type Option
- func WithActorIdleTimeout(timeout time.Duration) Option
- func WithActorTypeHandler(actorType string, handler http.HandlerFunc) Option
- func WithActorTypes(types ...string) Option
- func WithDB(db *sqlite.SQLite) Option
- func WithDaprdOptions(dopts ...daprd.Option) Option
- func WithDrainOngoingCallTimeout(timeout time.Duration) Option
- func WithDrainRebalancedActors(drain bool) Option
- func WithEntityConfig(opts ...EntityConfig) Option
- func WithHandler(pattern string, handler http.HandlerFunc) Option
- func WithMaxBodySize(size string) Option
- func WithPeerActor(actor *Actors) Option
- func WithPlacement(placement *placement.Placement) Option
- func WithPlacementService() Option
- func WithReentry(enabled bool) Option
- func WithReentryMaxDepth(maxDepth uint32) Option
- func WithResources(resources ...string) Option
- func WithScheduler(scheduler *scheduler.Scheduler) Option
- func WithSchedulerPlacement() Option
- func WithSharedControlPlane() Option
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 (*Actors) GRPCClient ¶
func (*Actors) 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
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.
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 WithActorTypeHandler ¶
func WithActorTypeHandler(actorType string, handler http.HandlerFunc) Option
func WithActorTypes ¶
func WithDaprdOptions ¶ added in v1.17.7
WithDaprdOptions appends additional daprd options applied when building the underlying daprd process.
func WithDrainOngoingCallTimeout ¶ added in v1.17.0
func WithDrainRebalancedActors ¶ added in v1.17.0
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 WithPeerActor ¶
func WithPlacement ¶
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 WithReentryMaxDepth ¶
func WithResources ¶
func WithScheduler ¶
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