manager

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorContainer deprecated

type ActorContainer interface {
	Invoke(methodName string, param []byte) ([]reflect.Value, actorErr.ActorErr)
	//nolint:staticcheck // SA1019 Deprecated: use ActorContainerContext instead.
	GetActor() actor.Server
}

Deprecated: use ActorContainerContext instead.

func NewDefaultActorContainer

func NewDefaultActorContainer(actorID string, impl actor.Server, serializer codec.Codec) (ActorContainer, actorErr.ActorErr)

NewDefaultActorContainer creates a new ActorContainer with provider impl actor and serializer. Deprecated: use NewDefaultActorContainerContext instead.

type ActorContainerContext added in v1.8.0

type ActorContainerContext interface {
	Invoke(ctx context.Context, methodName string, param []byte) ([]reflect.Value, actorErr.ActorErr)
	GetActor() actor.ServerContext
}

func NewDefaultActorContainerContext added in v1.8.0

func NewDefaultActorContainerContext(ctx context.Context, actorID string, impl actor.ServerContext, serializer codec.Codec) (ActorContainerContext, actorErr.ActorErr)

NewDefaultActorContainerContext is the same as NewDefaultActorContainer, but with initial context.

type ActorManager

type ActorManager interface {
	RegisterActorImplFactory(f actor.Factory)
	InvokeMethod(actorID, methodName string, request []byte) ([]byte, actorErr.ActorErr)
	DeactivateActor(actorID string) actorErr.ActorErr
	InvokeReminder(actorID, reminderName string, params []byte) actorErr.ActorErr
	InvokeTimer(actorID, timerName string, params []byte) actorErr.ActorErr
}

func NewDefaultActorManager deprecated

func NewDefaultActorManager(serializerType string) (ActorManager, actorErr.ActorErr)

Deprecated: use DefaultActorManagerContext instead.

type ActorManagerContext added in v1.8.0

type ActorManagerContext interface {
	RegisterActorImplFactory(f actor.FactoryContext)
	InvokeMethod(ctx context.Context, actorID, methodName string, request []byte) ([]byte, actorErr.ActorErr)
	DeactivateActor(ctx context.Context, actorID string) actorErr.ActorErr
	InvokeReminder(ctx context.Context, actorID, reminderName string, params []byte) actorErr.ActorErr
	InvokeTimer(ctx context.Context, actorID, timerName string, params []byte) actorErr.ActorErr
}

func NewDefaultActorManagerContext added in v1.8.0

func NewDefaultActorManagerContext(serializerType string) (ActorManagerContext, actorErr.ActorErr)

type DefaultActorContainer

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

DefaultActorContainer contains actor instance and methods type info generated from actor. Deprecated: use DefaultActorContainerContext instead.

func (*DefaultActorContainer) GetActor deprecated

func (d *DefaultActorContainer) GetActor() actor.Server

Deprecated: use NewDefaultActorContainerContext instead.

func (*DefaultActorContainer) Invoke

func (d *DefaultActorContainer) Invoke(methodName string, param []byte) ([]reflect.Value, actorErr.ActorErr)

Invoke call actor method with given methodName and param. Deprecated: use NewDefaultActorContainerContext instead.

type DefaultActorContainerContext added in v1.8.0

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

DefaultActorContainerContext contains actor instance and methods type info generated from actor.

func (*DefaultActorContainerContext) GetActor added in v1.8.0

func (*DefaultActorContainerContext) Invoke added in v1.8.0

func (d *DefaultActorContainerContext) Invoke(ctx context.Context, methodName string, param []byte) ([]reflect.Value, actorErr.ActorErr)

Invoke call actor method with given context, methodName and param.

type DefaultActorManager

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

DefaultActorManager is to manage one type of actor. Deprecated: use DefaultActorManagerContext instead.

func (*DefaultActorManager) DeactivateActor deprecated added in v1.4.0

func (m *DefaultActorManager) DeactivateActor(actorID string) actorErr.ActorErr

Deprecated: use DefaultActorManagerContext instead.

func (*DefaultActorManager) InvokeMethod deprecated

func (m *DefaultActorManager) InvokeMethod(actorID, methodName string, request []byte) ([]byte, actorErr.ActorErr)

Deprecated: use DefaultActorManagerContext instead.

func (*DefaultActorManager) InvokeReminder deprecated

func (m *DefaultActorManager) InvokeReminder(actorID, reminderName string, params []byte) actorErr.ActorErr

Deprecated: use DefaultActorManagerContext instead.

func (*DefaultActorManager) InvokeTimer deprecated

func (m *DefaultActorManager) InvokeTimer(actorID, timerName string, params []byte) actorErr.ActorErr

Deprecated: use DefaultActorManagerContext instead.

func (*DefaultActorManager) RegisterActorImplFactory deprecated

func (m *DefaultActorManager) RegisterActorImplFactory(f actor.Factory)

Deprecated: use DefaultActorManagerContext instead.

type DefaultActorManagerContext added in v1.8.0

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

DefaultActorManagerContext is to manage one type of actor.

func (*DefaultActorManagerContext) DeactivateActor added in v1.8.0

func (m *DefaultActorManagerContext) DeactivateActor(_ context.Context, actorID string) actorErr.ActorErr

DeactivateActor removes actor from actor manager.

func (*DefaultActorManagerContext) InvokeMethod added in v1.8.0

func (m *DefaultActorManagerContext) InvokeMethod(ctx context.Context, actorID, methodName string, request []byte) ([]byte, actorErr.ActorErr)

InvokeMethod to invoke local function by @actorID, @methodName and @request request param.

func (*DefaultActorManagerContext) InvokeReminder added in v1.8.0

func (m *DefaultActorManagerContext) InvokeReminder(ctx context.Context, actorID, reminderName string, params []byte) actorErr.ActorErr

InvokeReminder invoke reminder function with given params.

func (*DefaultActorManagerContext) InvokeTimer added in v1.8.0

func (m *DefaultActorManagerContext) InvokeTimer(ctx context.Context, actorID, timerName string, params []byte) actorErr.ActorErr

InvokeTimer invoke timer callback function with given params.

func (*DefaultActorManagerContext) RegisterActorImplFactory added in v1.8.0

func (m *DefaultActorManagerContext) RegisterActorImplFactory(f actor.FactoryContext)

RegisterActorImplFactory registers the action factory f.

type MethodType

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

MethodType is description of service method.

type Service

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

Service is description of service.

Jump to

Keyboard shortcuts

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