nsregistry

package
v1.26.2-121.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package nsregistry is a generated GoMock package.

Index

Constants

View Source
const (

	// CacheRefreshFailureRetryInterval is the wait time
	// if refreshment encounters error
	CacheRefreshFailureRetryInterval = 1 * time.Second
	CacheRefreshPageSize             = 1000
)

Variables

View Source
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.

func RegistryLifetimeHooks

func RegistryLifetimeHooks(
	lc fx.Lifecycle,
	registry namespace.Registry,
)

Types

type Clock

type Clock interface {
	// Now returns the current time.
	Now() time.Time
}

Clock provides timestamping to Registry objects

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.

func (*MockClock) Now

func (m *MockClock) Now() time.Time

Now mocks base method.

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

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPersistence) GetMetadata

GetMetadata mocks base method.

func (*MockPersistence) GetNamespace

GetNamespace mocks base method.

func (*MockPersistence) ListNamespaces

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 any) *gomock.Call

GetMetadata indicates an expected call of GetMetadata.

func (*MockPersistenceMockRecorder) GetNamespace

func (mr *MockPersistenceMockRecorder) GetNamespace(arg0, arg1 any) *gomock.Call

GetNamespace indicates an expected call of GetNamespace.

func (*MockPersistenceMockRecorder) ListNamespaces

func (mr *MockPersistenceMockRecorder) ListNamespaces(arg0, arg1 any) *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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL