Documentation ¶
Overview ¶
Package nsregistry is a generated GoMock package.
Index ¶
- Constants
- Variables
- func NewRegistry(aPersistence Persistence, enableGlobalNamespaces bool, ...) *registry
- func RegistryLifetimeHooks(lc fx.Lifecycle, registry namespace.Registry)
- type Clock
- type MockClock
- type MockClockMockRecorder
- type MockPersistence
- func (m *MockPersistence) EXPECT() *MockPersistenceMockRecorder
- func (m *MockPersistence) GetMetadata(arg0 context.Context) (*persistence.GetMetadataResponse, error)
- func (m *MockPersistence) GetNamespace(arg0 context.Context, arg1 *persistence.GetNamespaceRequest) (*persistence.GetNamespaceResponse, error)
- func (m *MockPersistence) ListNamespaces(arg0 context.Context, arg1 *persistence.ListNamespacesRequest) (*persistence.ListNamespacesResponse, error)
- type MockPersistenceMockRecorder
- type Persistence
Constants ¶
const ( // CacheRefreshFailureRetryInterval is the wait time // if refreshment encounters error CacheRefreshFailureRetryInterval = 1 * time.Second CacheRefreshPageSize = 1000 )
Variables ¶
var RegistryLifetimeHooksModule = fx.Options( fx.Invoke(RegistryLifetimeHooks), )
Functions ¶
func NewRegistry ¶
func NewRegistry( aPersistence Persistence, enableGlobalNamespaces bool, refreshInterval dynamicconfig.DurationPropertyFn, forceSearchAttributesCacheRefreshOnRead dynamicconfig.BoolPropertyFn, metricsHandler metrics.Handler, logger log.Logger, ) *registry
NewRegistry creates a new instance of Registry for accessing and caching namespace information to reduce the load on persistence.
Types ¶
type MockClock ¶
type MockClock struct {
// contains filtered or unexported fields
}
MockClock is a mock of Clock interface.
func NewMockClock ¶
func NewMockClock(ctrl *gomock.Controller) *MockClock
NewMockClock creates a new mock instance.
func (*MockClock) EXPECT ¶
func (m *MockClock) EXPECT() *MockClockMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockClockMockRecorder ¶
type MockClockMockRecorder struct {
// contains filtered or unexported fields
}
MockClockMockRecorder is the mock recorder for MockClock.
func (*MockClockMockRecorder) Now ¶
func (mr *MockClockMockRecorder) Now() *gomock.Call
Now indicates an expected call of Now.
type MockPersistence ¶
type MockPersistence struct {
// contains filtered or unexported fields
}
MockPersistence is a mock of Persistence interface.
func NewMockPersistence ¶
func NewMockPersistence(ctrl *gomock.Controller) *MockPersistence
NewMockPersistence creates a new mock instance.
func (*MockPersistence) EXPECT ¶
func (m *MockPersistence) EXPECT() *MockPersistenceMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPersistence) GetMetadata ¶
func (m *MockPersistence) GetMetadata(arg0 context.Context) (*persistence.GetMetadataResponse, error)
GetMetadata mocks base method.
func (*MockPersistence) GetNamespace ¶
func (m *MockPersistence) GetNamespace(arg0 context.Context, arg1 *persistence.GetNamespaceRequest) (*persistence.GetNamespaceResponse, error)
GetNamespace mocks base method.
func (*MockPersistence) ListNamespaces ¶
func (m *MockPersistence) ListNamespaces(arg0 context.Context, arg1 *persistence.ListNamespacesRequest) (*persistence.ListNamespacesResponse, error)
ListNamespaces mocks base method.
type MockPersistenceMockRecorder ¶
type MockPersistenceMockRecorder struct {
// contains filtered or unexported fields
}
MockPersistenceMockRecorder is the mock recorder for MockPersistence.
func (*MockPersistenceMockRecorder) GetMetadata ¶
func (mr *MockPersistenceMockRecorder) GetMetadata(arg0 interface{}) *gomock.Call
GetMetadata indicates an expected call of GetMetadata.
func (*MockPersistenceMockRecorder) GetNamespace ¶
func (mr *MockPersistenceMockRecorder) GetNamespace(arg0, arg1 interface{}) *gomock.Call
GetNamespace indicates an expected call of GetNamespace.
func (*MockPersistenceMockRecorder) ListNamespaces ¶
func (mr *MockPersistenceMockRecorder) ListNamespaces(arg0, arg1 interface{}) *gomock.Call
ListNamespaces indicates an expected call of ListNamespaces.
type Persistence ¶
type Persistence interface { // GetNamespace reads the state for a single namespace by name or ID // from persistent storage, returning an instance of // serviceerror.NamespaceNotFound if there is no matching Namespace. GetNamespace( context.Context, *persistence.GetNamespaceRequest, ) (*persistence.GetNamespaceResponse, error) // ListNamespaces fetches a paged set of namespace persistent state // instances. ListNamespaces( context.Context, *persistence.ListNamespacesRequest, ) (*persistence.ListNamespacesResponse, error) // GetMetadata fetches the notification version for Temporal namespaces. GetMetadata(context.Context) (*persistence.GetMetadataResponse, error) }
Persistence describes the durable storage requirements for a Registry instance.