Documentation
¶
Index ¶
- Constants
- Variables
- type AddPayloadRequest
- type AddPayloadResponse
- type ClosePayloadStoreRequest
- type ClosePayloadStoreResponse
- 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) Close(_ chasm.MutableContext, _ ClosePayloadStoreRequest) (ClosePayloadStoreResponse, error)
- func (s *PayloadStore) Describe(_ chasm.Context, _ DescribePayloadStoreRequest) (*testspb.TestPayloadStore, error)
- func (s *PayloadStore) GetPayload(chasmContext chasm.Context, key string) (*commonpb.Payload, error)
- func (s *PayloadStore) LifecycleState(_ chasm.Context) chasm.LifecycleState
- func (s *PayloadStore) RemovePayload(mutableContext chasm.MutableContext, key string) (*testspb.TestPayloadStore, error)
- type PayloadTTLPureTaskExecutor
- type PayloadTTLPureTaskValidator
- type PayloadTTLSideEffectTaskExecutor
- type PayloadTTLSideEffectTaskValidator
- type RemovePayloadRequest
- type RemovePayloadResponse
Constants ¶
View Source
const ( TotalCountMemoFieldName = "TotalCount" TotalSizeMemoFieldName = "TotalSize" )
View Source
const ( TestKeywordSAFieldName = searchattribute.TemporalScheduledById TestKeywordSAFieldValue = "test-keyword-value" )
TODO: Register proper SA for TotalCount and TotalSize For now, CHASM framework does NOT support Per-Component SearchAttributes so just update a random existing pre-defined SA to make sure the logic works.
Variables ¶
View Source
var Library = &library{}
Functions ¶
This section is empty.
Types ¶
type AddPayloadRequest ¶
type AddPayloadResponse ¶
type AddPayloadResponse struct {
State *testspb.TestPayloadStore
}
func AddPayloadHandler ¶
func AddPayloadHandler( ctx context.Context, request AddPayloadRequest, ) (AddPayloadResponse, 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 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) Close ¶
func (s *PayloadStore) Close( _ chasm.MutableContext, _ ClosePayloadStoreRequest, ) (ClosePayloadStoreResponse, error)
func (*PayloadStore) Describe ¶
func (s *PayloadStore) Describe( _ chasm.Context, _ DescribePayloadStoreRequest, ) (*testspb.TestPayloadStore, error)
func (*PayloadStore) GetPayload ¶
func (*PayloadStore) LifecycleState ¶
func (s *PayloadStore) LifecycleState( _ chasm.Context, ) chasm.LifecycleState
func (*PayloadStore) RemovePayload ¶
func (s *PayloadStore) RemovePayload( mutableContext chasm.MutableContext, key string, ) (*testspb.TestPayloadStore, 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( _ 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( _ 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.