isolationgroup

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package isolationgroup is a generated GoMock package.

Index

Constants

View Source
const (
	GroupKey         = "isolation-group"
	OriginalGroupKey = "original-isolation-group"
	WorkflowIDKey    = "wf-id"
)

Variables

This section is empty.

Functions

func ConfigFromContext added in v1.3.0

func ConfigFromContext(ctx context.Context) map[string]string

ConfigFromContext retrieves infomation about the partition config of the context which is used for tasklist isolation

func ContextWithConfig added in v1.3.0

func ContextWithConfig(ctx context.Context, partitionConfig map[string]string) context.Context

ContextWithConfig stores the partition config of tasklist isolation into the given context

func ContextWithIsolationGroup added in v1.3.0

func ContextWithIsolationGroup(ctx context.Context, isolationGroup string) context.Context

ContextWithIsolationGroup stores the isolation group into the given context

func IsolationGroupFromContext added in v1.3.0

func IsolationGroupFromContext(ctx context.Context) string

IsolationGroupFromContext retrieves the isolation group from the given context, which is used to identify which isolation group the poller is from

Types

type MockState

type MockState struct {
	// contains filtered or unexported fields
}

MockState is a mock of State interface.

func NewMockState

func NewMockState(ctrl *gomock.Controller) *MockState

NewMockState creates a new mock instance.

func (*MockState) EXPECT

func (m *MockState) EXPECT() *MockStateMockRecorder

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

func (*MockState) IsDrained

func (m *MockState) IsDrained(ctx context.Context, Domain, IsolationGroup string) (bool, error)

IsDrained mocks base method.

func (*MockState) IsDrainedByDomainID

func (m *MockState) IsDrainedByDomainID(ctx context.Context, DomainID, IsolationGroup string) (bool, error)

IsDrainedByDomainID mocks base method.

func (*MockState) Start

func (m *MockState) Start()

Start mocks base method.

func (*MockState) Stop

func (m *MockState) Stop()

Stop mocks base method.

type MockStateMockRecorder

type MockStateMockRecorder struct {
	// contains filtered or unexported fields
}

MockStateMockRecorder is the mock recorder for MockState.

func (*MockStateMockRecorder) IsDrained

func (mr *MockStateMockRecorder) IsDrained(ctx, Domain, IsolationGroup any) *gomock.Call

IsDrained indicates an expected call of IsDrained.

func (*MockStateMockRecorder) IsDrainedByDomainID

func (mr *MockStateMockRecorder) IsDrainedByDomainID(ctx, DomainID, IsolationGroup any) *gomock.Call

IsDrainedByDomainID indicates an expected call of IsDrainedByDomainID.

func (*MockStateMockRecorder) Start

func (mr *MockStateMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockStateMockRecorder) Stop

func (mr *MockStateMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop.

type State

type State interface {
	common.Daemon
	// IsDrained answers the question - "is this particular isolationGroup drained?". Used by startWorkflow calls
	// and similar sync frontend calls to make routing decisions
	IsDrained(ctx context.Context, Domain string, IsolationGroup string) (bool, error)
	IsDrainedByDomainID(ctx context.Context, DomainID string, IsolationGroup string) (bool, error)
}

State is a heavily cached in-memory library for returning the state of what zones are healthy or drained presently. It may return an inclusive (allow-list based) or an exclusive (deny-list based) set of IsolationGroups depending on the implementation.

Directories

Path Synopsis
Package isolationgroupapi is a generated GoMock package.
Package isolationgroupapi is a generated GoMock package.

Jump to

Keyboard shortcuts

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