table

package
v1.15.0-rc.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorHostOptions

type ActorHostOptions struct {
	EntityConfigs           map[string]api.EntityConfig
	DrainRebalancedActors   bool
	DrainOngoingCallTimeout time.Duration
}

type ActorTypeFactory

type ActorTypeFactory struct {
	Type    string
	Factory targets.Factory
}

type Interface

type Interface interface {
	io.Closer

	Types() []string
	IsActorTypeHosted(actorType string) bool
	HostedTarget(actorType, actorKey string) (targets.Interface, bool)
	GetOrCreate(actorType, actorID string) (targets.Interface, bool, error)
	RegisterActorTypes(opts RegisterActorTypeOptions)
	UnRegisterActorTypes(actorTypes ...string) error
	SubscribeToTypeUpdates(ctx context.Context) (<-chan []string, []string)
	HaltAll() error
	Halt(ctx context.Context, target targets.Idlable) error
	Drain(fn func(actorType, actorID string) bool)
	Len() map[string]int
}

func New

func New(opts Options) Interface

type Options

type Options struct {
	IdlerQueue *queue.Processor[string, targets.Idlable]
}

type RegisterActorTypeOptions

type RegisterActorTypeOptions struct {
	HostOptions *ActorHostOptions
	Factories   []ActorTypeFactory
}

Jump to

Keyboard shortcuts

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