Documentation ¶
Index ¶
- func AllocListenAddress(t *testing.T) string
- func NewNexusServer(t *testing.T, listenAddr string, handler nexus.Handler)
- type Handler
- type NamespaceService
- func (n *NamespaceService) GetNamespace(ctx context.Context, request *persistence.GetNamespaceRequest) (*persistence.GetNamespaceResponse, error)
- func (n *NamespaceService) HandleTransmissionTask(ctx context.Context, namespaceOperation enumsspb.NamespaceOperation, ...) error
- func (n *NamespaceService) UpdateNamespace(ctx context.Context, request *persistence.UpdateNamespaceRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllocListenAddress ¶
Types ¶
type Handler ¶
type Handler struct { nexus.UnimplementedHandler OnStartOperation func(ctx context.Context, operation string, input *nexus.LazyValue, options nexus.StartOperationOptions) (nexus.HandlerStartOperationResult[any], error) OnCancelOperation func(ctx context.Context, operation, operationID string, options nexus.CancelOperationOptions) error }
func (Handler) CancelOperation ¶
func (Handler) StartOperation ¶
type NamespaceService ¶
type NamespaceService struct { OnGetNamespace func(ctx context.Context, request *persistence.GetNamespaceRequest) (*persistence.GetNamespaceResponse, error) OnUpdateNamespace func(ctx context.Context, request *persistence.UpdateNamespaceRequest) error }
NamespaceService is a test implementation of [nexus.NamespaceService] and [namespace.Replicator] that allows you to easily override its methods. It will panic if any of its methods are called without their respective On* fields being set.
func (*NamespaceService) GetNamespace ¶
func (n *NamespaceService) GetNamespace(ctx context.Context, request *persistence.GetNamespaceRequest) (*persistence.GetNamespaceResponse, error)
func (*NamespaceService) HandleTransmissionTask ¶
func (n *NamespaceService) HandleTransmissionTask( ctx context.Context, namespaceOperation enumsspb.NamespaceOperation, info *persistencespb.NamespaceInfo, config *persistencespb.NamespaceConfig, replicationConfig *persistencespb.NamespaceReplicationConfig, nexusOutgoingServices []*persistencespb.NexusOutgoingService, replicationClusterListUpdated bool, configVersion int64, failoverVersion int64, isGlobalNamespace bool, failoverHistory []*persistencespb.FailoverStatus, ) error
func (*NamespaceService) UpdateNamespace ¶
func (n *NamespaceService) UpdateNamespace(ctx context.Context, request *persistence.UpdateNamespaceRequest) error
Click to show internal directories.
Click to hide internal directories.