Documentation ¶
Overview ¶
Foliage statefun plugins package. Provides unified interfaces for stateful functions plugins
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestProvider ¶ added in v0.1.1
type RequestProvider int
const ( NatsCoreGlobalRequest RequestProvider = iota GolangLocalRequest )
type SignalProvider ¶ added in v0.1.1
type SignalProvider int
const (
JetstreamGlobalSignal SignalProvider = iota
)
type StatefunAddress ¶
type StatefunContextProcessor ¶
type StatefunContextProcessor struct { GlobalCache *cache.Store GetFunctionContext func() *easyjson.JSON SetFunctionContext func(*easyjson.JSON) GetObjectContext func() *easyjson.JSON SetObjectContext func(*easyjson.JSON) ObjectMutexLock func(errorOnLocked bool) error ObjectMutexUnlock func() error // TODO: DownstreamSignal(<function type>, <links filters>, <payload>, <options>) Signal func(SignalProvider, string, string, *easyjson.JSON, *easyjson.JSON) error Request func(RequestProvider, string, string, *easyjson.JSON, *easyjson.JSON) (*easyjson.JSON, error) Self StatefunAddress Caller StatefunAddress Payload *easyjson.JSON Options *easyjson.JSON Reply *SyncReply // when requested in function: nil - function was signaled, !nil - function was requested }
type StatefunExecutor ¶
type StatefunExecutor interface { Run(contextProcessor *StatefunContextProcessor) error BuildError() error }
type StatefunExecutorConstructor ¶
type StatefunExecutorConstructor func(alias string, source string) StatefunExecutor
type TypenameExecutorPlugin ¶
type TypenameExecutorPlugin struct {
// contains filtered or unexported fields
}
func NewTypenameExecutor ¶
func NewTypenameExecutor(alias string, source string, executorContructorFunction StatefunExecutorConstructor) *TypenameExecutorPlugin
func (*TypenameExecutorPlugin) AddForID ¶
func (tnex *TypenameExecutorPlugin) AddForID(id string)
func (*TypenameExecutorPlugin) GetForID ¶
func (tnex *TypenameExecutorPlugin) GetForID(id string) StatefunExecutor
func (*TypenameExecutorPlugin) RemoveForID ¶
func (tnex *TypenameExecutorPlugin) RemoveForID(id string)
Click to show internal directories.
Click to hide internal directories.