plugins

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 4 Imported by: 5

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 StatefunAddress

type StatefunAddress struct {
	Typename string
	ID       string
}

type StatefunContextProcessor

type StatefunContextProcessor struct {
	GlobalCache        *cache.Store
	GetFunctionContext func() *easyjson.JSON
	SetFunctionContext func(*easyjson.JSON)
	GetObjectContext   func() *easyjson.JSON
	SetObjectContext   func(*easyjson.JSON)
	Call               func(string, string, *easyjson.JSON, *easyjson.JSON)
	// TODO: DownstreamCall(<function type>, <links filters>, <payload>, <options>)
	GolangCallSync func(string, string, *easyjson.JSON, *easyjson.JSON) (*easyjson.JSON, error)
	Egress         func(string, *easyjson.JSON)
	Self           StatefunAddress
	Caller         StatefunAddress
	Payload        *easyjson.JSON
	Options        *easyjson.JSON
}

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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