nexustest

package
v1.24.0-m2.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 (*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

Jump to

Keyboard shortcuts

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