Documentation
¶
Index ¶
- Constants
- Variables
- func DeletePayloadStoreHandler(ctx context.Context, request DeletePayloadStoreRequest) error
- func NewTestServiceNexusService() *nexus.Service
- func NewTestServiceNexusServiceProcessor() *chasm.NexusServiceProcessor
- type AddPayloadRequest
- type AddPayloadResponse
- type CancelPayloadStoreRequest
- type CancelPayloadStoreResponse
- type ClosePayloadStoreRequest
- type ClosePayloadStoreResponse
- type DeletePayloadStoreRequest
- type DescribePayloadStoreRequest
- type DescribePayloadStoreResponse
- type GetPayloadRequest
- type GetPayloadResponse
- type NewPayloadStoreRequest
- type NewPayloadStoreResponse
- type PayloadStore
- func (s *PayloadStore) AddPayload(mutableContext chasm.MutableContext, request AddPayloadRequest) (*testspb.TestPayloadStore, error)
- func (s *PayloadStore) Cancel(_ chasm.MutableContext, _ CancelPayloadStoreRequest) (CancelPayloadStoreResponse, error)
- func (s *PayloadStore) Close(chasmContext chasm.MutableContext, _ chasm.NoValue) (ClosePayloadStoreResponse, error)
- func (s *PayloadStore) Describe(chasmContext chasm.Context, _ DescribePayloadStoreRequest) (*testspb.TestPayloadStore, error)
- func (s *PayloadStore) GetPayload(chasmContext chasm.Context, key string) (*commonpb.Payload, error)
- func (s *PayloadStore) LifecycleState(chasmContext chasm.Context) chasm.LifecycleState
- func (s *PayloadStore) Memo(chasmContext chasm.Context) proto.Message
- func (s *PayloadStore) RemovePayload(mutableContext chasm.MutableContext, key string) (*testspb.TestPayloadStore, error)
- func (s *PayloadStore) SearchAttributes(chasmContext chasm.Context) []chasm.SearchAttributeKeyValue
- func (s *PayloadStore) Terminate(mutableContext chasm.MutableContext, _ chasm.TerminateComponentRequest) (chasm.TerminateComponentResponse, error)
- type PayloadTTLPureTaskExecutor
- type PayloadTTLPureTaskValidator
- type PayloadTTLSideEffectTaskExecutor
- type PayloadTTLSideEffectTaskValidator
- type RemovePayloadRequest
- type RemovePayloadResponse
Constants ¶
View Source
const ( TotalCountMemoFieldName = "TotalCount" TotalSizeMemoFieldName = "TotalSize" )
View Source
const ( TestScheduleID = "TestScheduleID" PayloadTotalCountSAAlias = "PayloadTotalCount" PayloadTotalSizeSAAlias = "PayloadTotalSize" ExecutionStatusSAAlias = "ExecutionStatus" DefaultPayloadStoreTaskQueue = "payload-store-task-queue" )
Variables ¶
View Source
var ( PayloadTotalCountSearchAttribute = chasm.NewSearchAttributeInt(PayloadTotalCountSAAlias, chasm.SearchAttributeFieldInt01) PayloadTotalSizeSearchAttribute = chasm.NewSearchAttributeInt(PayloadTotalSizeSAAlias, chasm.SearchAttributeFieldInt02) ExecutionStatusSearchAttribute = chasm.NewSearchAttributeKeyword(ExecutionStatusSAAlias, chasm.SearchAttributeFieldLowCardinalityKeyword01) )
View Source
var Library = &library{}
View Source
var Module = fx.Module( "chasm.lib.tests", fx.Invoke(func(registry *chasm.Registry) error { return registry.Register(Library) }), )
View Source
var TestOperation = nexus.NewSyncOperation("TestOperation", func(ctx context.Context, input string, options nexus.StartOperationOptions) (string, error) { return "Hello, " + input, nil })
Functions ¶
func DeletePayloadStoreHandler ¶
func DeletePayloadStoreHandler( ctx context.Context, request DeletePayloadStoreRequest, ) error
func NewTestServiceNexusServiceProcessor ¶
func NewTestServiceNexusServiceProcessor() *chasm.NexusServiceProcessor
Types ¶
type AddPayloadRequest ¶
type AddPayloadResponse ¶
type AddPayloadResponse struct {
State *testspb.TestPayloadStore
}
func AddPayloadHandler ¶
func AddPayloadHandler( ctx context.Context, request AddPayloadRequest, ) (AddPayloadResponse, error)
type CancelPayloadStoreResponse ¶
type CancelPayloadStoreResponse struct{}
func CancelPayloadStoreHandler ¶
func CancelPayloadStoreHandler( ctx context.Context, request CancelPayloadStoreRequest, ) (CancelPayloadStoreResponse, error)
type ClosePayloadStoreResponse ¶
type ClosePayloadStoreResponse struct{}
func ClosePayloadStoreHandler ¶
func ClosePayloadStoreHandler( ctx context.Context, request ClosePayloadStoreRequest, ) (ClosePayloadStoreResponse, error)
type DescribePayloadStoreResponse ¶
type DescribePayloadStoreResponse struct {
State *testspb.TestPayloadStore
}
func DescribePayloadStoreHandler ¶
func DescribePayloadStoreHandler( ctx context.Context, request DescribePayloadStoreRequest, ) (DescribePayloadStoreResponse, error)
type GetPayloadRequest ¶
type GetPayloadResponse ¶
func GetPayloadHandler ¶
func GetPayloadHandler( ctx context.Context, request GetPayloadRequest, ) (GetPayloadResponse, error)
type NewPayloadStoreRequest ¶
type NewPayloadStoreRequest struct {
NamespaceID namespace.ID
StoreID string
IDReusePolicy chasm.BusinessIDReusePolicy
IDConflictPolicy chasm.BusinessIDConflictPolicy
}
type NewPayloadStoreResponse ¶
type NewPayloadStoreResponse struct {
RunID string
}
func NewPayloadStoreHandler ¶
func NewPayloadStoreHandler( ctx context.Context, request NewPayloadStoreRequest, ) (NewPayloadStoreResponse, error)
type PayloadStore ¶
type PayloadStore struct {
chasm.UnimplementedComponent
State *testspb.TestPayloadStore
Payloads chasm.Map[string, *commonpb.Payload]
Visibility chasm.Field[*chasm.Visibility]
}
func NewPayloadStore ¶
func NewPayloadStore( mutableContext chasm.MutableContext, ) (*PayloadStore, error)
func (*PayloadStore) AddPayload ¶
func (s *PayloadStore) AddPayload( mutableContext chasm.MutableContext, request AddPayloadRequest, ) (*testspb.TestPayloadStore, error)
func (*PayloadStore) Cancel ¶
func (s *PayloadStore) Cancel( _ chasm.MutableContext, _ CancelPayloadStoreRequest, ) (CancelPayloadStoreResponse, error)
func (*PayloadStore) Close ¶
func (s *PayloadStore) Close( chasmContext chasm.MutableContext, _ chasm.NoValue, ) (ClosePayloadStoreResponse, error)
func (*PayloadStore) Describe ¶
func (s *PayloadStore) Describe( chasmContext chasm.Context, _ DescribePayloadStoreRequest, ) (*testspb.TestPayloadStore, error)
func (*PayloadStore) GetPayload ¶
func (*PayloadStore) LifecycleState ¶
func (s *PayloadStore) LifecycleState( chasmContext chasm.Context, ) chasm.LifecycleState
func (*PayloadStore) Memo ¶
func (s *PayloadStore) Memo(chasmContext chasm.Context) proto.Message
Memo implements chasm.VisibilityMemoProvider interface
func (*PayloadStore) RemovePayload ¶
func (s *PayloadStore) RemovePayload( mutableContext chasm.MutableContext, key string, ) (*testspb.TestPayloadStore, error)
func (*PayloadStore) SearchAttributes ¶
func (s *PayloadStore) SearchAttributes( chasmContext chasm.Context, ) []chasm.SearchAttributeKeyValue
SearchAttributes implements chasm.VisibilitySearchAttributesProvider interface
func (*PayloadStore) Terminate ¶
func (s *PayloadStore) Terminate( mutableContext chasm.MutableContext, _ chasm.TerminateComponentRequest, ) (chasm.TerminateComponentResponse, error)
type PayloadTTLPureTaskExecutor ¶
type PayloadTTLPureTaskExecutor struct{}
func (*PayloadTTLPureTaskExecutor) Execute ¶
func (e *PayloadTTLPureTaskExecutor) Execute( mutableContext chasm.MutableContext, store *PayloadStore, _ chasm.TaskAttributes, task *testspb.TestPayloadTTLPureTask, ) error
type PayloadTTLPureTaskValidator ¶
type PayloadTTLPureTaskValidator struct{}
func (*PayloadTTLPureTaskValidator) Validate ¶
func (v *PayloadTTLPureTaskValidator) Validate( chasmContext chasm.Context, store *PayloadStore, attributes chasm.TaskAttributes, task *testspb.TestPayloadTTLPureTask, ) (bool, error)
type PayloadTTLSideEffectTaskExecutor ¶
type PayloadTTLSideEffectTaskExecutor struct{}
func (*PayloadTTLSideEffectTaskExecutor) Execute ¶
func (e *PayloadTTLSideEffectTaskExecutor) Execute( ctx context.Context, ref chasm.ComponentRef, _ chasm.TaskAttributes, task *testspb.TestPayloadTTLSideEffectTask, ) error
type PayloadTTLSideEffectTaskValidator ¶
type PayloadTTLSideEffectTaskValidator struct{}
func (*PayloadTTLSideEffectTaskValidator) Validate ¶
func (v *PayloadTTLSideEffectTaskValidator) Validate( chasmContext chasm.Context, store *PayloadStore, attributes chasm.TaskAttributes, task *testspb.TestPayloadTTLSideEffectTask, ) (bool, error)
type RemovePayloadRequest ¶
type RemovePayloadResponse ¶
type RemovePayloadResponse struct {
State *testspb.TestPayloadStore
}
func RemovePayloadHandler ¶
func RemovePayloadHandler( ctx context.Context, request RemovePayloadRequest, ) (RemovePayloadResponse, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
gen
|
|
|
testspb/v1
Code generated by protoc-gen-go-helpers.
|
Code generated by protoc-gen-go-helpers. |
Click to show internal directories.
Click to hide internal directories.