actor

package
v0.0.0-...-83edfdb Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 30 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExecutor

func NewExecutor(faasAddress string, blobStore blobs.Store) actor.Actor

NewExecutor creates a new executor actor with the given funcions service endpoint

func NewExponentialBackoffStrategy

func NewExponentialBackoffStrategy(backoffWindow time.Duration, initialBackoff time.Duration, decider actor.DeciderFunc) actor.SupervisorStrategy

NewExponentialBackoffStrategy creates a new Supervisor strategy that restarts a faulting child using an exponential back off algorithm when decider returns actor.RestartDirective

func NewGraphActor

func NewGraphActor(executor *actor.PID) actor.Actor

NewGraphActor returns a pointer to a new graph actor

func NewGraphManager

func NewGraphManager(persistenceProvider persistence.ProviderState, blobStore blobs.Store, fnURL string, shardExtractor sharding.ShardExtractor, shards []int) (model.FlowServiceServer, error)

NewGraphManager creates a new implementation of the GraphManager interface

func NewGraphSupervisor

func NewGraphSupervisor(name string, executor *actor.PID, persistenceProvider persistence.Provider) actor.Actor

NewGraphSupervisor creates new graphSupervisor actor

Types

type EventStreamPlugin

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

EventStreamPlugin provides a mixin that will publish all intercepted user messages to the associated stream

func (*EventStreamPlugin) OnOtherMessage

func (p *EventStreamPlugin) OnOtherMessage(ctx actor.Context, usrMsg interface{})

OnOtherMessage implements plugin.OnOtherMessage - sends message to stream

func (*EventStreamPlugin) OnStart

func (p *EventStreamPlugin) OnStart(ctx actor.Context)

OnStart configures implements plugin.OnStart for the event stream plugin

type ExecHandler

type ExecHandler interface {
	HandleInvokeStage(msg *model.InvokeStageRequest) *model.FaasInvocationResponse
	HandleInvokeFunction(msg *model.InvokeFunctionRequest) *model.FaasInvocationResponse
}

ExecHandler abstracts the FaaS execution backend implementations must handle all errors and return an appropriate invocation responser

type PIDAware

type PIDAware interface {
	SetPID(name *actor.PID)
}

PIDAware is an actor mix-in that makes an actor aware of its own PID

type PIDAwarePlugin

type PIDAwarePlugin struct{}

PIDAwarePlugin is a plugin that causes proto actor to set the PID (via PIDAware) on actors that want to know their PID

func (*PIDAwarePlugin) OnOtherMessage

func (p *PIDAwarePlugin) OnOtherMessage(ctx actor.Context, usrMsg interface{})

OnOtherMessage part of the Actor middleware interface

func (*PIDAwarePlugin) OnStart

func (p *PIDAwarePlugin) OnStart(ctx actor.Context)

OnStart set up the PIDAwarePlugin

type PIDHolder

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

PIDHolder is a re-usable base type for actors that want to know their own PID

func (*PIDHolder) GetSelf

func (ph *PIDHolder) GetSelf() *actor.PID

GetSelf returns the actors own PID

func (*PIDHolder) SetPID

func (ph *PIDHolder) SetPID(pid *actor.PID)

SetPID sets the PID on an actor via the PIDAware plugin

Jump to

Keyboard shortcuts

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