Documentation ¶
Overview ¶
Package testing is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GetFakeMetadataItems() []commonapi.NameValuePair
- func GetFakeProperties() map[string]string
- func GetFreePorts(num uint) ([]int, error)
- func MatchContextInterface(v any) bool
- func WaitForListeningAddress(t *testing.T, timeout time.Duration, addresses ...string)
- type Event
- type FailingAppChannel
- func (f *FailingAppChannel) GetAppConfig(_ context.Context, appID string) (*config.ApplicationConfig, error)
- func (f *FailingAppChannel) HealthProbe(ctx context.Context) (bool, error)
- func (f *FailingAppChannel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest, appID string) (*invokev1.InvokeMethodResponse, error)
- func (f *FailingAppChannel) SetAppHealth(ah *apphealth.AppHealth)
- func (f *FailingAppChannel) TriggerJob(ctx context.Context, name string, data *anypb.Any) (*invokev1.InvokeMethodResponse, error)
- type FailingBinding
- func (m *FailingBinding) Close() error
- func (m *FailingBinding) Init(ctx context.Context, metadata bindings.Metadata) error
- func (m *FailingBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
- func (m *FailingBinding) Operations() []bindings.OperationKind
- type FailingConfigurationStore
- func (f *FailingConfigurationStore) Close() error
- func (f *FailingConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
- func (f *FailingConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
- func (f *FailingConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, ...) (string, error)
- func (f *FailingConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
- type FailingDirectMessaging
- func (_m *FailingDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
- func (_m *FailingDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
- func (_m *FailingDirectMessaging) SetHTTPEndpointsAppChannels(nonResourceChannel channel.HTTPEndpointAppChannel, ...)
- type FailingPubsub
- func (f *FailingPubsub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
- func (f *FailingPubsub) BulkSubscribe(ctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
- func (f *FailingPubsub) Close() error
- func (f *FailingPubsub) Features() []pubsub.Feature
- func (f *FailingPubsub) Init(ctx context.Context, metadata pubsub.Metadata) error
- func (f *FailingPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
- func (f *FailingPubsub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
- type FailingSecretStore
- func (c FailingSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
- func (c FailingSecretStore) Close() error
- func (c FailingSecretStore) Features() []secretstores.Feature
- func (c FailingSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
- func (c FailingSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
- type FailingStatestore
- func (f *FailingStatestore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
- func (f *FailingStatestore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (f *FailingStatestore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
- func (f *FailingStatestore) Close() error
- func (f *FailingStatestore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (f *FailingStatestore) Features() []state.Feature
- func (f *FailingStatestore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (f *FailingStatestore) Init(ctx context.Context, metadata state.Metadata) error
- func (f *FailingStatestore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (f *FailingStatestore) Ping() error
- func (f *FailingStatestore) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
- func (f *FailingStatestore) Set(ctx context.Context, req *state.SetRequest) error
- type FailingSubtleCrypto
- func (c FailingSubtleCrypto) Decrypt(ctx context.Context, ciphertext []byte, algorithm string, keyName string, ...) (plaintext []byte, err error)
- func (c FailingSubtleCrypto) Encrypt(ctx context.Context, plaintext []byte, algorithm string, keyName string, ...) (ciphertext []byte, tag []byte, err error)
- func (c FailingSubtleCrypto) GetKey(ctx context.Context, keyName string) (pubKey jwk.Key, err error)
- func (c FailingSubtleCrypto) Sign(ctx context.Context, digest []byte, algorithm string, keyName string) (signature []byte, err error)
- func (c FailingSubtleCrypto) UnwrapKey(ctx context.Context, wrappedKey []byte, algorithm string, keyName string, ...) (plaintextKey jwk.Key, err error)
- func (c FailingSubtleCrypto) Verify(ctx context.Context, digest []byte, signature []byte, algorithm string, ...) (valid bool, err error)
- func (c FailingSubtleCrypto) WrapKey(ctx context.Context, plaintextKey jwk.Key, algorithm string, keyName string, ...) (wrappedKey []byte, tag []byte, err error)
- type Failure
- type FakeSecretStore
- func (c FakeSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
- func (c FakeSecretStore) Close() error
- func (c FakeSecretStore) Features() []secretstores.Feature
- func (c FakeSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
- func (c FakeSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
- type FakeStateStore
- func (f *FakeStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
- func (f *FakeStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (f *FakeStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
- func (f *FakeStateStore) CallCount(op string) uint64
- func (f *FakeStateStore) Close() error
- func (f *FakeStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (f *FakeStateStore) Features() []state.Feature
- func (f *FakeStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (f *FakeStateStore) GetItems() map[string]*FakeStateStoreItem
- func (f *FakeStateStore) Init(ctx context.Context, metadata state.Metadata) error
- func (f *FakeStateStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (f *FakeStateStore) MultiMaxSize() int
- func (f *FakeStateStore) NewItem(data []byte) *FakeStateStoreItem
- func (f *FakeStateStore) Ping() error
- func (f *FakeStateStore) Set(ctx context.Context, req *state.SetRequest) error
- type FakeStateStoreItem
- type FakeSubtleCrypto
- func (c FakeSubtleCrypto) Close() error
- func (c FakeSubtleCrypto) Decrypt(ctx context.Context, ciphertext []byte, algorithm string, keyName string, ...) (plaintext []byte, err error)
- func (c FakeSubtleCrypto) Encrypt(ctx context.Context, plaintext []byte, algorithm string, keyName string, ...) (ciphertext []byte, tag []byte, err error)
- func (c FakeSubtleCrypto) Features() []contribCrypto.Feature
- func (c FakeSubtleCrypto) GetKey(ctx context.Context, keyName string) (pubKey jwk.Key, err error)
- func (c FakeSubtleCrypto) Init(ctx context.Context, metadata contribCrypto.Metadata) error
- func (c FakeSubtleCrypto) Sign(ctx context.Context, digest []byte, algorithm string, keyName string) (signature []byte, err error)
- func (c FakeSubtleCrypto) SupportedEncryptionAlgorithms() []string
- func (c FakeSubtleCrypto) SupportedSignatureAlgorithms() []string
- func (c FakeSubtleCrypto) UnwrapKey(ctx context.Context, wrappedKey []byte, algorithm string, keyName string, ...) (plaintextKey jwk.Key, err error)
- func (c FakeSubtleCrypto) Verify(ctx context.Context, digest []byte, signature []byte, algorithm string, ...) (valid bool, err error)
- func (c FakeSubtleCrypto) WrapKey(ctx context.Context, plaintextKey jwk.Key, algorithm string, keyName string, ...) (wrappedKey []byte, tag []byte, err error)
- type InMemoryPubsub
- func (m *InMemoryPubsub) BulkPublish(req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
- func (m *InMemoryPubsub) BulkSubscribe(parentCtx context.Context, req pubsub.SubscribeRequest, ...) (pubsub.BulkSubscribeResponse, error)
- func (m *InMemoryPubsub) Close() error
- func (m *InMemoryPubsub) Features() []pubsub.Feature
- func (m *InMemoryPubsub) Init(ctx context.Context, metadata pubsub.Metadata) error
- func (m *InMemoryPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
- func (m *InMemoryPubsub) SetBulkHandler(h func(topic string, msg *pubsub.BulkMessage))
- func (m *InMemoryPubsub) SetHandler(h func(topic string, msg *pubsub.NewMessage))
- func (m *InMemoryPubsub) SetOnSubscribedTopicsChanged(f func([]string))
- func (m *InMemoryPubsub) Subscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
- type KeyValState
- type MockApp
- type MockBinding
- func (m *MockBinding) Close() error
- func (m *MockBinding) Init(ctx context.Context, metadata bindings.Metadata) error
- func (m *MockBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
- func (m *MockBinding) Operations() []bindings.OperationKind
- func (m *MockBinding) Read(ctx context.Context, handler bindings.Handler) error
- func (m *MockBinding) SetOnReadCloseCh(ch chan struct{})
- type MockConfigurationStore
- func (_m *MockConfigurationStore) Close() error
- func (_m *MockConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
- func (_m *MockConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
- func (_m *MockConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, ...) (string, error)
- func (_m *MockConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
- type MockDirectMessaging
- func (_m *MockDirectMessaging) Close() error
- func (_m *MockDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
- func (_m *MockDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
- func (_m *MockDirectMessaging) SetHTTPEndpointsAppChannels(nonResourceChannel channel.HTTPEndpointAppChannel, ...)
- type MockFieldIndexer
- type MockManager
- func (m *MockManager) Add(runnable manager.Runnable) error
- func (m *MockManager) AddHealthzCheck(name string, check healthz.Checker) error
- func (m *MockManager) AddMetricsExtraHandler(path string, handler http.Handler) error
- func (m *MockManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error
- func (m *MockManager) AddReadyzCheck(name string, check healthz.Checker) error
- func (m *MockManager) Elected() <-chan struct{}
- func (m *MockManager) GetAPIReader() client.Reader
- func (m *MockManager) GetCache() cache.Cache
- func (m *MockManager) GetClient() client.Client
- func (m *MockManager) GetConfig() *rest.Config
- func (m *MockManager) GetControllerOptions() config.Controller
- func (m *MockManager) GetEventRecorderFor(name string) record.EventRecorder
- func (m *MockManager) GetFieldIndexer() client.FieldIndexer
- func (m *MockManager) GetHTTPClient() *http.Client
- func (m *MockManager) GetIndexerFunc(obj client.Object) client.IndexerFunc
- func (m *MockManager) GetLogger() logr.Logger
- func (m *MockManager) GetRESTMapper() meta.RESTMapper
- func (m *MockManager) GetRunnables() []manager.Runnable
- func (m *MockManager) GetScheme() *runtime.Scheme
- func (m *MockManager) GetWebhookServer() webhook.Server
- func (m *MockManager) SetFields(interface{}) error
- func (m *MockManager) Start(ctx context.Context) error
- type MockPubSub
- func (m *MockPubSub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
- func (m *MockPubSub) BulkSubscribe(rctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
- func (m *MockPubSub) Close() error
- func (m *MockPubSub) Features() []pubsub.Feature
- func (m *MockPubSub) Init(ctx context.Context, metadata pubsub.Metadata) error
- func (m *MockPubSub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
- func (m *MockPubSub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
- type MockPubSubAdapter
- type MockQuerier
- type MockResolver
- type MockStateStore
- func (_m *MockStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
- func (_m *MockStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (_m *MockStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
- func (_m *MockStateStore) Close() error
- func (_m *MockStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (_m *MockStateStore) Features() []state.Feature
- func (_m *MockStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (_m *MockStateStore) Init(ctx context.Context, metadata state.Metadata) error
- func (_m *MockStateStore) Ping() error
- func (_m *MockStateStore) Set(ctx context.Context, req *state.SetRequest) error
- type MockStore
- func (m *MockStore) Close() error
- func (m *MockStore) EXPECT() *MockStoreMockRecorder
- func (m *MockStore) InitLockStore(ctx context.Context, metadata lock.Metadata) error
- func (m *MockStore) TryLock(ctx context.Context, req *lock.TryLockRequest) (*lock.TryLockResponse, error)
- func (m *MockStore) Unlock(ctx context.Context, req *lock.UnlockRequest) (*lock.UnlockResponse, error)
- type MockStoreMockRecorder
- type MockWorkflow
- func (w *MockWorkflow) Close() error
- func (w *MockWorkflow) Get(ctx context.Context, req *workflowContrib.GetRequest) (*workflowContrib.StateResponse, error)
- func (w *MockWorkflow) Init(metadata workflowContrib.Metadata) error
- func (w *MockWorkflow) Pause(ctx context.Context, req *workflowContrib.PauseRequest) error
- func (w *MockWorkflow) Purge(ctx context.Context, req *workflowContrib.PurgeRequest) error
- func (w *MockWorkflow) RaiseEvent(ctx context.Context, req *workflowContrib.RaiseEventRequest) error
- func (w *MockWorkflow) Resume(ctx context.Context, req *workflowContrib.ResumeRequest) error
- func (w *MockWorkflow) Start(ctx context.Context, req *workflowContrib.StartRequest) (*workflowContrib.StartResponse, error)
- func (w *MockWorkflow) Terminate(ctx context.Context, req *workflowContrib.TerminateRequest) error
- type TransactionalStoreMock
Constants ¶
const ErrorInstanceID = "errorInstanceID"
const (
TestRuntimeConfigID = "consumer0"
)
Variables ¶
var ( ErrFakeWorkflowComponentError = errors.New("fake workflow error") ErrFakeWorkflowNonRecursiveTerminateError = errors.New("fake workflow non recursive terminate error") ErrFakeWorkflowNonRecurisvePurgeError = errors.New("fake workflow non recursive purge error") )
var TestResiliency = &v1alpha1.Resiliency{ Spec: v1alpha1.ResiliencySpec{ Policies: v1alpha1.Policies{ Retries: map[string]v1alpha1.Retry{ "singleRetry": { MaxRetries: ptr.Of(1), MaxInterval: "100ms", Policy: "constant", Duration: "10ms", }, }, Timeouts: map[string]string{ "fast": "100ms", }, }, Targets: v1alpha1.Targets{ Components: map[string]v1alpha1.ComponentPolicyNames{ "failOutput": { Outbound: v1alpha1.PolicyNames{ Retry: "singleRetry", Timeout: "fast", }, }, "failPubsub": { Outbound: v1alpha1.PolicyNames{ Retry: "singleRetry", Timeout: "fast", }, Inbound: v1alpha1.PolicyNames{ Retry: "singleRetry", Timeout: "fast", }, }, "failingInputBinding": { Inbound: v1alpha1.PolicyNames{ Retry: "singleRetry", Timeout: "fast", }, }, }, }, }, }
Functions ¶
func GetFakeMetadataItems ¶
func GetFakeMetadataItems() []commonapi.NameValuePair
func GetFakeProperties ¶
func GetFreePorts ¶
GetFreePorts asks the kernel for `num` free open ports that are ready to use. This code is retrofitted from freeport.GetFreePort().
func MatchContextInterface ¶
Types ¶
type Event ¶
type Event struct { EventName string `json:"eventName,omitempty"` To []string `json:"to,omitempty"` Concurrency string `json:"concurrency,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"` State []KeyValState `json:"state,omitempty"` Data interface{} `json:"data,omitempty"` }
Event is an app response event.
type FailingAppChannel ¶
type FailingAppChannel struct { Failure Failure KeyFunc func(req *invokev1.InvokeMethodRequest) string }
func (*FailingAppChannel) GetAppConfig ¶
func (f *FailingAppChannel) GetAppConfig(_ context.Context, appID string) (*config.ApplicationConfig, error)
func (*FailingAppChannel) HealthProbe ¶
func (f *FailingAppChannel) HealthProbe(ctx context.Context) (bool, error)
func (*FailingAppChannel) InvokeMethod ¶
func (f *FailingAppChannel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest, appID string) (*invokev1.InvokeMethodResponse, error)
func (*FailingAppChannel) SetAppHealth ¶
func (f *FailingAppChannel) SetAppHealth(ah *apphealth.AppHealth)
func (*FailingAppChannel) TriggerJob ¶
func (f *FailingAppChannel) TriggerJob(ctx context.Context, name string, data *anypb.Any) (*invokev1.InvokeMethodResponse, error)
type FailingBinding ¶
type FailingBinding struct {
Failure Failure
}
func (*FailingBinding) Close ¶
func (m *FailingBinding) Close() error
func (*FailingBinding) Invoke ¶
func (m *FailingBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
Invoke is a mock invoke method.
func (*FailingBinding) Operations ¶
func (m *FailingBinding) Operations() []bindings.OperationKind
Operations is a mock operations method.
type FailingConfigurationStore ¶
type FailingConfigurationStore struct {
Failure Failure
}
func (*FailingConfigurationStore) Close ¶
func (f *FailingConfigurationStore) Close() error
func (*FailingConfigurationStore) Get ¶
func (f *FailingConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
func (*FailingConfigurationStore) Init ¶
func (f *FailingConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
func (*FailingConfigurationStore) Subscribe ¶
func (f *FailingConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, handler configuration.UpdateHandler) (string, error)
func (*FailingConfigurationStore) Unsubscribe ¶
func (f *FailingConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
type FailingDirectMessaging ¶
func (*FailingDirectMessaging) Invoke ¶
func (_m *FailingDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
func (*FailingDirectMessaging) SetAppChannel ¶
func (_m *FailingDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
func (*FailingDirectMessaging) SetHTTPEndpointsAppChannels ¶
func (_m *FailingDirectMessaging) SetHTTPEndpointsAppChannels(nonResourceChannel channel.HTTPEndpointAppChannel, resourceChannels map[string]channel.HTTPEndpointAppChannel)
SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel
type FailingPubsub ¶
type FailingPubsub struct {
Failure Failure
}
FailingPubsub is a mock pubsub component object that simulates failures.
func (*FailingPubsub) BulkPublish ¶
func (f *FailingPubsub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
func (*FailingPubsub) BulkSubscribe ¶
func (f *FailingPubsub) BulkSubscribe(ctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
func (*FailingPubsub) Close ¶
func (f *FailingPubsub) Close() error
func (*FailingPubsub) Features ¶
func (f *FailingPubsub) Features() []pubsub.Feature
func (*FailingPubsub) Publish ¶
func (f *FailingPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
func (*FailingPubsub) Subscribe ¶
func (f *FailingPubsub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
type FailingSecretStore ¶
type FailingSecretStore struct {
Failure Failure
}
func (FailingSecretStore) BulkGetSecret ¶
func (c FailingSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
func (FailingSecretStore) Close ¶
func (c FailingSecretStore) Close() error
func (FailingSecretStore) Features ¶
func (c FailingSecretStore) Features() []secretstores.Feature
func (FailingSecretStore) GetSecret ¶
func (c FailingSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
func (FailingSecretStore) Init ¶
func (c FailingSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
type FailingStatestore ¶
func (*FailingStatestore) BulkDelete ¶
func (f *FailingStatestore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
func (*FailingStatestore) BulkGet ¶
func (f *FailingStatestore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
func (*FailingStatestore) BulkSet ¶
func (f *FailingStatestore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
func (*FailingStatestore) Close ¶
func (f *FailingStatestore) Close() error
func (*FailingStatestore) Delete ¶
func (f *FailingStatestore) Delete(ctx context.Context, req *state.DeleteRequest) error
func (*FailingStatestore) Features ¶
func (f *FailingStatestore) Features() []state.Feature
func (*FailingStatestore) Get ¶
func (f *FailingStatestore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
func (*FailingStatestore) Multi ¶
func (f *FailingStatestore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
func (*FailingStatestore) Ping ¶
func (f *FailingStatestore) Ping() error
func (*FailingStatestore) Query ¶
func (f *FailingStatestore) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
func (*FailingStatestore) Set ¶
func (f *FailingStatestore) Set(ctx context.Context, req *state.SetRequest) error
type FailingSubtleCrypto ¶
type FailingSubtleCrypto struct { FakeSubtleCrypto Failure Failure }
type Failure ¶
type Failure struct {
// contains filtered or unexported fields
}
func NewFailure ¶
func (*Failure) PerformFailure ¶
type FakeSecretStore ¶
type FakeSecretStore struct{}
func (FakeSecretStore) BulkGetSecret ¶
func (c FakeSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
func (FakeSecretStore) Close ¶
func (c FakeSecretStore) Close() error
func (FakeSecretStore) Features ¶
func (c FakeSecretStore) Features() []secretstores.Feature
func (FakeSecretStore) GetSecret ¶
func (c FakeSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
func (FakeSecretStore) Init ¶
func (c FakeSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
type FakeStateStore ¶
type FakeStateStore struct { MaxOperations int NoLock bool // contains filtered or unexported fields }
func NewFakeStateStore ¶
func NewFakeStateStore() *FakeStateStore
func (*FakeStateStore) BulkDelete ¶
func (f *FakeStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
func (*FakeStateStore) BulkGet ¶
func (f *FakeStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
func (*FakeStateStore) BulkSet ¶
func (f *FakeStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
func (*FakeStateStore) CallCount ¶
func (f *FakeStateStore) CallCount(op string) uint64
func (*FakeStateStore) Close ¶
func (f *FakeStateStore) Close() error
func (*FakeStateStore) Delete ¶
func (f *FakeStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
func (*FakeStateStore) Features ¶
func (f *FakeStateStore) Features() []state.Feature
func (*FakeStateStore) Get ¶
func (f *FakeStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
func (*FakeStateStore) GetItems ¶
func (f *FakeStateStore) GetItems() map[string]*FakeStateStoreItem
func (*FakeStateStore) Multi ¶
func (f *FakeStateStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
func (*FakeStateStore) MultiMaxSize ¶
func (f *FakeStateStore) MultiMaxSize() int
func (*FakeStateStore) NewItem ¶
func (f *FakeStateStore) NewItem(data []byte) *FakeStateStoreItem
func (*FakeStateStore) Ping ¶
func (f *FakeStateStore) Ping() error
func (*FakeStateStore) Set ¶
func (f *FakeStateStore) Set(ctx context.Context, req *state.SetRequest) error
type FakeStateStoreItem ¶
type FakeStateStoreItem struct {
// contains filtered or unexported fields
}
type FakeSubtleCrypto ¶
type FakeSubtleCrypto struct{}
func (FakeSubtleCrypto) Close ¶
func (c FakeSubtleCrypto) Close() error
func (FakeSubtleCrypto) Features ¶
func (c FakeSubtleCrypto) Features() []contribCrypto.Feature
func (FakeSubtleCrypto) Init ¶
func (c FakeSubtleCrypto) Init(ctx context.Context, metadata contribCrypto.Metadata) error
func (FakeSubtleCrypto) SupportedEncryptionAlgorithms ¶
func (c FakeSubtleCrypto) SupportedEncryptionAlgorithms() []string
func (FakeSubtleCrypto) SupportedSignatureAlgorithms ¶
func (c FakeSubtleCrypto) SupportedSignatureAlgorithms() []string
type InMemoryPubsub ¶
InMemoryPubsub is a mock pub-sub component object that works with in-memory handlers
func (*InMemoryPubsub) BulkPublish ¶
func (m *InMemoryPubsub) BulkPublish(req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
func (*InMemoryPubsub) BulkSubscribe ¶
func (m *InMemoryPubsub) BulkSubscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
func (*InMemoryPubsub) Features ¶
func (m *InMemoryPubsub) Features() []pubsub.Feature
func (*InMemoryPubsub) Publish ¶
func (m *InMemoryPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
Publish is a mock publish method.
func (*InMemoryPubsub) SetBulkHandler ¶
func (m *InMemoryPubsub) SetBulkHandler(h func(topic string, msg *pubsub.BulkMessage))
func (*InMemoryPubsub) SetHandler ¶
func (m *InMemoryPubsub) SetHandler(h func(topic string, msg *pubsub.NewMessage))
func (*InMemoryPubsub) SetOnSubscribedTopicsChanged ¶
func (m *InMemoryPubsub) SetOnSubscribedTopicsChanged(f func([]string))
func (*InMemoryPubsub) Subscribe ¶
func (m *InMemoryPubsub) Subscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
Subscribe is a mock subscribe method.
type KeyValState ¶
type KeyValState struct { Key string `json:"key"` Value interface{} `json:"value"` }
KeyValState is a key value struct for state.
type MockApp ¶
type MockApp struct {
// contains filtered or unexported fields
}
MockApp is a mock for an app.
func NewMockApp ¶
NewMockApp returns a new mocked app.
type MockBinding ¶
MockBinding is a mock input/output component object.
func (*MockBinding) Close ¶
func (m *MockBinding) Close() error
func (*MockBinding) Invoke ¶
func (m *MockBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
Invoke is a mock invoke method.
func (*MockBinding) Operations ¶
func (m *MockBinding) Operations() []bindings.OperationKind
Operations is a mock operations method.
func (*MockBinding) SetOnReadCloseCh ¶
func (m *MockBinding) SetOnReadCloseCh(ch chan struct{})
type MockConfigurationStore ¶
MockConfigurationStore is an autogenerated mock type for the Store type
func (*MockConfigurationStore) Close ¶
func (_m *MockConfigurationStore) Close() error
func (*MockConfigurationStore) Get ¶
func (_m *MockConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
Get provides a mock function with given fields: ctx, req
func (*MockConfigurationStore) Init ¶
func (_m *MockConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
Init provides a mock function with given fields: metadata
func (*MockConfigurationStore) Subscribe ¶
func (_m *MockConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, handler configuration.UpdateHandler) (string, error)
Subscribe provides a mock function with given fields: ctx, req, handler
func (*MockConfigurationStore) Unsubscribe ¶
func (_m *MockConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
Unsubscribe provides a mock function with given fields: ctx, req
type MockDirectMessaging ¶
MockDirectMessaging is a semi-autogenerated mock type for the MockDirectMessaging type. Note: This file is created by copy/pasting values and renaming to use MockDirectMessaging instead of DirectMessaging. You run "mockery --name directMessaging" in "pkg/messaging" and modify the corresponding values here.
func (*MockDirectMessaging) Close ¶
func (_m *MockDirectMessaging) Close() error
func (*MockDirectMessaging) Invoke ¶
func (_m *MockDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
Invoke provides a mock function with given fields: ctx, targetAppID, req
func (*MockDirectMessaging) SetAppChannel ¶
func (_m *MockDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
func (*MockDirectMessaging) SetHTTPEndpointsAppChannels ¶
func (_m *MockDirectMessaging) SetHTTPEndpointsAppChannels(nonResourceChannel channel.HTTPEndpointAppChannel, resourceChannels map[string]channel.HTTPEndpointAppChannel)
SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel
type MockFieldIndexer ¶
type MockFieldIndexer struct {
// contains filtered or unexported fields
}
func (*MockFieldIndexer) IndexField ¶
func (t *MockFieldIndexer) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error
type MockManager ¶
type MockManager struct {
// contains filtered or unexported fields
}
func NewMockManager ¶
func NewMockManager() *MockManager
func (*MockManager) AddHealthzCheck ¶
func (m *MockManager) AddHealthzCheck(name string, check healthz.Checker) error
func (*MockManager) AddMetricsExtraHandler ¶
func (m *MockManager) AddMetricsExtraHandler(path string, handler http.Handler) error
func (*MockManager) AddMetricsServerExtraHandler ¶
func (m *MockManager) AddMetricsServerExtraHandler(path string, handler http.Handler) error
func (*MockManager) AddReadyzCheck ¶
func (m *MockManager) AddReadyzCheck(name string, check healthz.Checker) error
func (*MockManager) Elected ¶
func (m *MockManager) Elected() <-chan struct{}
func (*MockManager) GetAPIReader ¶
func (m *MockManager) GetAPIReader() client.Reader
func (*MockManager) GetCache ¶
func (m *MockManager) GetCache() cache.Cache
func (*MockManager) GetClient ¶
func (m *MockManager) GetClient() client.Client
func (*MockManager) GetConfig ¶
func (m *MockManager) GetConfig() *rest.Config
func (*MockManager) GetControllerOptions ¶
func (m *MockManager) GetControllerOptions() config.Controller
func (*MockManager) GetEventRecorderFor ¶
func (m *MockManager) GetEventRecorderFor(name string) record.EventRecorder
func (*MockManager) GetFieldIndexer ¶
func (m *MockManager) GetFieldIndexer() client.FieldIndexer
func (*MockManager) GetHTTPClient ¶
func (m *MockManager) GetHTTPClient() *http.Client
func (*MockManager) GetIndexerFunc ¶
func (m *MockManager) GetIndexerFunc(obj client.Object) client.IndexerFunc
func (*MockManager) GetLogger ¶
func (m *MockManager) GetLogger() logr.Logger
func (*MockManager) GetRESTMapper ¶
func (m *MockManager) GetRESTMapper() meta.RESTMapper
func (*MockManager) GetRunnables ¶
func (m *MockManager) GetRunnables() []manager.Runnable
func (*MockManager) GetScheme ¶
func (m *MockManager) GetScheme() *runtime.Scheme
func (*MockManager) GetWebhookServer ¶
func (m *MockManager) GetWebhookServer() webhook.Server
func (*MockManager) SetFields ¶
func (m *MockManager) SetFields(interface{}) error
type MockPubSub ¶
MockPubSub is a mock pub-sub component object.
func (*MockPubSub) BulkPublish ¶
func (m *MockPubSub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
BulkPublish is a mock bulk publish method.
func (*MockPubSub) BulkSubscribe ¶
func (m *MockPubSub) BulkSubscribe(rctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
BulkSubscribe is a mock bulk subscribe method.
func (*MockPubSub) Features ¶
func (m *MockPubSub) Features() []pubsub.Feature
func (*MockPubSub) Publish ¶
func (m *MockPubSub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
Publish is a mock publish method.
func (*MockPubSub) Subscribe ¶
func (m *MockPubSub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
Subscribe is a mock subscribe method.
type MockPubSubAdapter ¶
type MockPubSubAdapter struct { PublishFn func(ctx context.Context, req *pubsub.PublishRequest) error BulkPublishFn func(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error) }
MockPubSubAdapter is mock for PubSubAdapter
func (*MockPubSubAdapter) BulkPublish ¶
func (a *MockPubSubAdapter) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
Publish is an adapter method for the runtime to pre-validate publish requests And then forward them to the Pub/Sub component. This method is used by the HTTP and gRPC APIs.
func (*MockPubSubAdapter) Publish ¶
func (a *MockPubSubAdapter) Publish(ctx context.Context, req *pubsub.PublishRequest) error
Publish is an adapter method for the runtime to pre-validate publish requests And then forward them to the Pub/Sub component. This method is used by the HTTP and gRPC APIs.
type MockQuerier ¶
MockQuerier is an autogenerated mock type for the Querier type
func (*MockQuerier) Query ¶
func (_m *MockQuerier) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
Query provides a mock function with given fields: req
type MockResolver ¶
MockResolver is a mock nameresolution component object.
func (*MockResolver) Close ¶
func (m *MockResolver) Close() error
func (*MockResolver) ResolveID ¶
func (m *MockResolver) ResolveID(_ context.Context, req nr.ResolveRequest) (string, error)
ResolveID is a mock resolve method.
type MockStateStore ¶
MockStateStore is an autogenerated mock type for the Store type
func (*MockStateStore) BulkDelete ¶
func (_m *MockStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
func (*MockStateStore) BulkGet ¶
func (_m *MockStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
func (*MockStateStore) BulkSet ¶
func (_m *MockStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
func (*MockStateStore) Close ¶
func (_m *MockStateStore) Close() error
func (*MockStateStore) Delete ¶
func (_m *MockStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
Delete provides a mock function with given fields: req
func (*MockStateStore) Features ¶
func (_m *MockStateStore) Features() []state.Feature
Features returns the features for this state store.
func (*MockStateStore) Get ¶
func (_m *MockStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
Get provides a mock function with given fields: req
func (*MockStateStore) Set ¶
func (_m *MockStateStore) Set(ctx context.Context, req *state.SetRequest) error
Set provides a mock function with given fields: req
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
MockStore is a mock of Store interface.
func NewMockStore ¶
func NewMockStore(ctrl *gomock.Controller) *MockStore
NewMockStore creates a new mock instance.
func (*MockStore) EXPECT ¶
func (m *MockStore) EXPECT() *MockStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStore) InitLockStore ¶
InitLockStore mocks base method.
func (*MockStore) TryLock ¶
func (m *MockStore) TryLock(ctx context.Context, req *lock.TryLockRequest) (*lock.TryLockResponse, error)
TryLock mocks base method.
func (*MockStore) Unlock ¶
func (m *MockStore) Unlock(ctx context.Context, req *lock.UnlockRequest) (*lock.UnlockResponse, error)
Unlock mocks base method.
type MockStoreMockRecorder ¶
type MockStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockStoreMockRecorder is the mock recorder for MockStore.
func (*MockStoreMockRecorder) InitLockStore ¶
func (mr *MockStoreMockRecorder) InitLockStore(ctx context.Context, metadata interface{}) *gomock.Call
InitLockStore indicates an expected call of InitLockStore.
type MockWorkflow ¶
type MockWorkflow struct{}
func (*MockWorkflow) Close ¶
func (w *MockWorkflow) Close() error
func (*MockWorkflow) Get ¶
func (w *MockWorkflow) Get(ctx context.Context, req *workflowContrib.GetRequest) (*workflowContrib.StateResponse, error)
func (*MockWorkflow) Init ¶
func (w *MockWorkflow) Init(metadata workflowContrib.Metadata) error
func (*MockWorkflow) Pause ¶
func (w *MockWorkflow) Pause(ctx context.Context, req *workflowContrib.PauseRequest) error
func (*MockWorkflow) Purge ¶
func (w *MockWorkflow) Purge(ctx context.Context, req *workflowContrib.PurgeRequest) error
func (*MockWorkflow) RaiseEvent ¶
func (w *MockWorkflow) RaiseEvent(ctx context.Context, req *workflowContrib.RaiseEventRequest) error
func (*MockWorkflow) Resume ¶
func (w *MockWorkflow) Resume(ctx context.Context, req *workflowContrib.ResumeRequest) error
func (*MockWorkflow) Start ¶
func (w *MockWorkflow) Start(ctx context.Context, req *workflowContrib.StartRequest) (*workflowContrib.StartResponse, error)
func (*MockWorkflow) Terminate ¶
func (w *MockWorkflow) Terminate(ctx context.Context, req *workflowContrib.TerminateRequest) error
type TransactionalStoreMock ¶
type TransactionalStoreMock struct { MaxOperations int MockStateStore }
func (*TransactionalStoreMock) Close ¶
func (storeMock *TransactionalStoreMock) Close() error
func (*TransactionalStoreMock) Features ¶
func (storeMock *TransactionalStoreMock) Features() []state.Feature
func (*TransactionalStoreMock) Multi ¶
func (storeMock *TransactionalStoreMock) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
Code generated by mockery v2.3.0. DO NOT EDIT.
func (*TransactionalStoreMock) MultiMaxSize ¶
func (storeMock *TransactionalStoreMock) MultiMaxSize() int
Source Files ¶
- app_channel_mock.go
- app_mock.go
- bindings_mock.go
- component.go
- context.go
- directmessaging_mock.go
- failure_mock.go
- fake_state_store.go
- lock_mock.go
- manager_mock.go
- nameresolution_mock.go
- network.go
- pubsub_mock.go
- pubsubadapter_mock.go
- querier_mock.go
- resiliency.go
- secrets_mock.go
- state_mock.go
- store_mock.go
- subtlecrypto_mock.go
- transactionalstore_mock.go
- workflow_mock.go