Documentation
¶
Overview ¶
Foliage statefun plugins package. Provides unified interfaces for stateful functions plugins
Index ¶
- type Domain
- type EgressProvider
- type LinkQuery
- func (lq *LinkQuery) GetCustom() string
- func (lq *LinkQuery) GetFilter() map[string]interface{}
- func (lq *LinkQuery) GetName() string
- func (lq *LinkQuery) GetTags() []string
- func (lq *LinkQuery) GetType() string
- func (lq *LinkQuery) Validate() error
- func (lq *LinkQuery) WithCustom(custom string)
- func (lq *LinkQuery) WithFilter(filter map[string]interface{})
- func (lq *LinkQuery) WithName(name string)
- func (lq *LinkQuery) WithTags(tags ...string)
- type ObjectRequestFunc
- type ObjectRequestReply
- type ObjectSignalFunc
- type PluginError
- type RequestProvider
- type SFEgressFunc
- type SFRequestFunc
- type SFSignalFunc
- type SignalProvider
- type StatefunAddress
- type StatefunContextProcessor
- type StatefunExecutor
- type StatefunExecutorConstructor
- type SyncReply
- type TypenameExecutorPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Domain ¶ added in v0.1.6
type Domain interface {
HubDomainName() string
Name() string
Cache() *cache.Store
GetDomainFromObjectID(objectID string) string
GetObjectIDWithoutDomain(objectID string) string
CreateObjectIDWithDomain(domain string, objectID string, domainReplace bool) string
CreateObjectIDWithThisDomain(objectID string, domainReplace bool) string
CreateObjectIDWithHubDomain(objectID string, domainReplace bool) string
// Get all domains in weak cluster including this one
GetWeakClusterDomains() []string
// Set all domains in weak cluster (this domain name will also be included automatically if not defined)
SetWeakClusterDomains(weakClusterDomains []string)
/*
* otherDomainName/ObjectId -> thisDomainName/otherDomainName#ObjectId
* thisDomainName/ObjectId -> thisDomainName/ObjectId
*/
GetShadowObjectShadowId(objectIdWithAnyDomainName string) string
/*
* domainName1/domainName2#ObjectId -> domainName2, ObjectId
*/
GetShadowObjectDomainAndID(shadowObjectId string) (domainName, objectIdWithoutDomain string, err error)
/*
* domainName1/domainName2#ObjectId -> true
* domainName1/ObjectId -> false
*/
IsShadowObject(idWithDomain string) bool
GetValidObjectId(objectId string) string
CreateCustomShadowId(storeDomain, targetDomain, uuid string) string
}
type EgressProvider ¶ added in v0.1.6
type EgressProvider int
const (
NatsCoreEgress EgressProvider = iota
)
type LinkQuery ¶
type LinkQuery struct {
// contains filtered or unexported fields
}
func NewLinkQuery ¶
func (*LinkQuery) WithCustom ¶
func (*LinkQuery) WithFilter ¶
type ObjectRequestFunc ¶
type ObjectRequestReply ¶
type ObjectSignalFunc ¶
type PluginError ¶ added in v0.1.6
type RequestProvider ¶ added in v0.1.1
type RequestProvider int
const ( AutoRequestSelect RequestProvider = iota NatsCoreGlobalRequest GolangLocalRequest )
type SFEgressFunc ¶ added in v0.1.6
type SFEgressFunc func(egressProvider EgressProvider, payload *easyjson.JSON, customId ...string) error
type SFRequestFunc ¶ added in v0.1.6
type SFSignalFunc ¶ added in v0.1.6
type SignalProvider ¶ added in v0.1.1
type SignalProvider int
const ( AutoSignalSelect SignalProvider = iota JetstreamGlobalSignal GolangLocalSignal )
type StatefunAddress ¶
type StatefunContextProcessor ¶
type StatefunContextProcessor struct {
GetFunctionContext func() *easyjson.JSON
SetFunctionContext func(*easyjson.JSON)
SetContextExpirationAfter func(time.Duration)
GetObjectContext func() *easyjson.JSON
SetObjectContext func(*easyjson.JSON)
GetObjectImplTypes func() (types []string, err error)
ObjectMutexLock func(objectId string, errorOnLocked bool) error
ObjectMutexUnlock func(objectId string) error
Domain Domain
Signal SFSignalFunc
Request SFRequestFunc
ObjectSignal ObjectSignalFunc
ObjectRequest ObjectRequestFunc
Egress SFEgressFunc
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(ctx *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.