Documentation ¶
Index ¶
- Constants
- Variables
- func AbortTxn(env *Env)
- func AssertConditionFailure(err error)
- func AssignedSyncInvoke(env *Env, callee string, input interface{}, preInvokeLog *IntentLogEntry) (interface{}, string)
- func AsyncInvoke(env *Env, callee string, input interface{}) string
- func BeginTxn(env *Env)
- func BuildProjection(names []string) expression.ProjectionBuilder
- func CHECK(err error)
- func CheckLogDataField(intentLog *IntentLogEntry, field string, expected string)
- func CommitTxn(env *Env)
- func CondWrite(env *Env, tablename string, key string, ...)
- func CreateBaselineTable(lambdaId string)
- func CreateCollectorTable(lambdaId string)
- func CreateFuncHandlerFactory(f func(env *Env) interface{}) types.FuncHandlerFactory
- func CreateLambdaTables(lambdaId string)
- func CreateLogTable(lambdaId string)
- func CreateMainTable(lambdaId string)
- func CreateTxnTables(lambdaId string)
- func DeleteLambdaTables(lambdaId string)
- func DeleteTable(tablename string)
- func IntentStepStreamTag(instanceId string) uint64
- func LibAppendLog(env *Env, tag uint64, data interface{}) uint64
- func LibRead(tablename string, key aws.JSONValue, projection []string) aws.JSONValue
- func LibScan(tablename string, projection []string) []aws.JSONValue
- func LibScanWithLast(tablename string, projection []string, ...) []aws.JSONValue
- func LibWrite(tablename string, key aws.JSONValue, ...)
- func Lock(env *Env, tablename string, key string) bool
- func LockStreamTag(lockId string) uint64
- func LogStepResult(env *Env, instanceId string, stepNumber int32, data aws.JSONValue)
- func Populate(tablename string, key string, value interface{}, baseline bool)
- func Read(env *Env, tablename string, key string) interface{}
- func Scan(env *Env, tablename string) interface{}
- func SyncInvoke(env *Env, callee string, input interface{}) (interface{}, string)
- func TPLAbort(env *Env)
- func TPLCommit(env *Env)
- func TPLRead(env *Env, tablename string, key string) (bool, interface{})
- func TPLWrite(env *Env, tablename string, key string, value aws.JSONValue) bool
- func TransactionStreamTag(lambdaId string, txnId string) uint64
- func Unlock(env *Env, tablename string, key string)
- func WaitUntilActive(tablename string) bool
- func WaitUntilAllActive(tablenames []string) bool
- func WaitUntilAllDeleted(tablenames []string)
- func WaitUntilDeleted(tablename string)
- func Write(env *Env, tablename string, key string, ...)
- func WriteHead(tablename string, key string)
- func WriteNRows(tablename string, key string, n int)
- func WriteTail(tablename string, key string, row string)
- type Env
- type InputWrapper
- type IntentFsm
- type IntentLogEntry
- type InvokeError
- type LockFsm
- type LockLogEntry
- type LogEntry
- type OutputWrapper
- type StackTraceCall
- type TxnLogEntry
Constants ¶
View Source
const IntentLogTag uint64 = 1
Variables ¶
View Source
var DBClient = dynamodb.New(sess)
View Source
var T = int64(60)
View Source
var TYPE = "BELDI"
Functions ¶
func AssertConditionFailure ¶
func AssertConditionFailure(err error)
func AssignedSyncInvoke ¶
func AssignedSyncInvoke(env *Env, callee string, input interface{}, preInvokeLog *IntentLogEntry) (interface{}, string)
func AsyncInvoke ¶
func BuildProjection ¶
func BuildProjection(names []string) expression.ProjectionBuilder
func CheckLogDataField ¶
func CheckLogDataField(intentLog *IntentLogEntry, field string, expected string)
func CondWrite ¶
func CondWrite(env *Env, tablename string, key string, update map[expression.NameBuilder]expression.OperandBuilder, cond expression.ConditionBuilder)
func CreateBaselineTable ¶
func CreateBaselineTable(lambdaId string)
func CreateCollectorTable ¶
func CreateCollectorTable(lambdaId string)
func CreateFuncHandlerFactory ¶
func CreateFuncHandlerFactory(f func(env *Env) interface{}) types.FuncHandlerFactory
func CreateLambdaTables ¶
func CreateLambdaTables(lambdaId string)
func CreateLogTable ¶
func CreateLogTable(lambdaId string)
func CreateMainTable ¶
func CreateMainTable(lambdaId string)
func CreateTxnTables ¶
func CreateTxnTables(lambdaId string)
func DeleteLambdaTables ¶
func DeleteLambdaTables(lambdaId string)
func DeleteTable ¶
func DeleteTable(tablename string)
func IntentStepStreamTag ¶
func LibAppendLog ¶
func LibScanWithLast ¶
func LibWrite ¶
func LibWrite(tablename string, key aws.JSONValue, update map[expression.NameBuilder]expression.OperandBuilder)
func LockStreamTag ¶
func LogStepResult ¶
func SyncInvoke ¶
func TransactionStreamTag ¶
func WaitUntilActive ¶
func WaitUntilAllActive ¶
func WaitUntilAllDeleted ¶
func WaitUntilAllDeleted(tablenames []string)
func WaitUntilDeleted ¶
func WaitUntilDeleted(tablename string)
func Write ¶
func Write(env *Env, tablename string, key string, update map[expression.NameBuilder]expression.OperandBuilder)
func WriteNRows ¶
Types ¶
type Env ¶
type Env struct { LambdaId string InstanceId string StepNumber int32 Input interface{} TxnId string Instruction string Baseline bool FaasCtx context.Context FaasEnv types.Environment Fsm *IntentFsm // added for NubesPlus TypeName string }
func PrepareEnv ¶
func PrepareEnv(iw *InputWrapper, lambdaId string) *Env
type InputWrapper ¶
type InputWrapper struct { CallerName string `mapstructure:"CallerName"` CallerId string `mapstructure:"CallerId"` CallerStep int32 `mapstructure:"CallerStep"` InstanceId string `mapstructure:"InstanceId"` Input interface{} `mapstructure:"Input"` TxnId string `mapstructure:"TxnId"` Instruction string `mapstructure:"Instruction"` Async bool `mapstructure:"Async"` }
func ParseInput ¶
func ParseInput(raw interface{}) *InputWrapper
func (*InputWrapper) Deserialize ¶
func (iw *InputWrapper) Deserialize(stream []byte)
func (*InputWrapper) Serialize ¶
func (iw *InputWrapper) Serialize() []byte
type IntentFsm ¶
type IntentFsm struct {
// contains filtered or unexported fields
}
func NewIntentFsm ¶
func (*IntentFsm) GetPostStepLog ¶
func (fsm *IntentFsm) GetPostStepLog(stepNumber int32) *IntentLogEntry
func (*IntentFsm) GetStepLog ¶
func (fsm *IntentFsm) GetStepLog(stepNumber int32) *IntentLogEntry
type IntentLogEntry ¶
type IntentLogEntry struct { SeqNum uint64 `json:"-"` InstanceId string `json:"instanceId"` StepNumber int32 `json:"step"` PostStep bool `json:"postStep"` Data aws.JSONValue `json:"data"` }
func FetchStepResultLog ¶
func FetchStepResultLog(env *Env, stepNumber int32, catch bool) *IntentLogEntry
func ProposeInvoke ¶
func ProposeInvoke(env *Env, callee string) *IntentLogEntry
func ProposeNextStep ¶
func ProposeNextStep(env *Env, data aws.JSONValue) (bool, *IntentLogEntry)
type InvokeError ¶
type InvokeError struct { ErrorMessage string `json:"errorMessage"` ErrorType string `json:"errorType"` StackTrace []StackTraceCall `json:"stackTrace"` }
func (*InvokeError) Deserialize ¶
func (ie *InvokeError) Deserialize(stream []byte)
type LockLogEntry ¶
type OutputWrapper ¶
type OutputWrapper struct { Status string Output interface{} }
func (*OutputWrapper) Deserialize ¶
func (ow *OutputWrapper) Deserialize(stream []byte)
func (*OutputWrapper) Serialize ¶
func (ow *OutputWrapper) Serialize() []byte
type StackTraceCall ¶
Click to show internal directories.
Click to hide internal directories.