manager

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT 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

type ActorContainer interface {
	Invoke(methodName string, param []byte) ([]reflect.Value, actorErr.ActorErr)
	GetActor() actor.Server
}

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.

type ActorManager

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

func NewDefaultActorManager

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

type DefaultActorContainer

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

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

func (*DefaultActorContainer) GetActor

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

func (*DefaultActorContainer) Invoke

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

Invoke call actor method with given methodName and param.

type DefaultActorManager

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

DefaultActorManager is to manage one type of actor.

func (*DefaultActorManager) DetectiveActor

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

DetectiveActor removes actor from actor manager.

func (*DefaultActorManager) InvokeMethod

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

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

func (*DefaultActorManager) InvokeReminder

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

InvokeReminder invoke reminder function with given params.

func (*DefaultActorManager) InvokeTimer

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

InvokeTimer invoke timer callback function with given params.

func (*DefaultActorManager) RegisterActorImplFactory

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

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