Documentation ¶
Overview ¶
Package partition is a generated GoMock package.
Index ¶
- Constants
- Variables
- func ConfigFromContext(ctx context.Context) map[string]string
- func ContextWithConfig(ctx context.Context, partitionConfig map[string]string) context.Context
- func ContextWithIsolationGroup(ctx context.Context, isolationGroup string) context.Context
- func IsolationGroupFromContext(ctx context.Context) string
- type MockPartitioner
- type MockPartitionerMockRecorder
- type PartitionConfig
- type Partitioner
Constants ¶
const ( IsolationGroupKey = "isolation-group" WorkflowIDKey = "wf-id" )
Variables ¶
var ErrInvalidPartitionConfig = errors.New("invalid partition config")
ErrInvalidPartitionConfig is returned when the required partitioning configuration is missing due to misconfiguration
var ErrNoIsolationGroupsAvailable = errors.New("no isolation-groups are available")
ErrNoIsolationGroupsAvailable is returned when there are no available isolation-groups this usually indicates a misconfiguration
Functions ¶
func ConfigFromContext ¶
ConfigFromContext retrieves infomation about the partition config of the context which is used for tasklist isolation
func ContextWithConfig ¶
ContextWithConfig stores the partition config of tasklist isolation into the given context
func ContextWithIsolationGroup ¶
ContextWithIsolationGroup stores the isolation group into the given context
func IsolationGroupFromContext ¶
IsolationGroupFromContext retrieves the isolation group from the given context, which is used to identify which isolation group the poller is from
Types ¶
type MockPartitioner ¶
type MockPartitioner struct {
// contains filtered or unexported fields
}
MockPartitioner is a mock of Partitioner interface.
func NewMockPartitioner ¶
func NewMockPartitioner(ctrl *gomock.Controller) *MockPartitioner
NewMockPartitioner creates a new mock instance.
func (*MockPartitioner) EXPECT ¶
func (m *MockPartitioner) EXPECT() *MockPartitionerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPartitioner) GetIsolationGroupByDomainID ¶
func (m *MockPartitioner) GetIsolationGroupByDomainID(ctx context.Context, DomainID string, partitionKey PartitionConfig, availableIsolationGroups []string) (string, error)
GetIsolationGroupByDomainID mocks base method.
type MockPartitionerMockRecorder ¶
type MockPartitionerMockRecorder struct {
// contains filtered or unexported fields
}
MockPartitionerMockRecorder is the mock recorder for MockPartitioner.
func (*MockPartitionerMockRecorder) GetIsolationGroupByDomainID ¶
func (mr *MockPartitionerMockRecorder) GetIsolationGroupByDomainID(ctx, DomainID, partitionKey, availableIsolationGroups interface{}) *gomock.Call
GetIsolationGroupByDomainID indicates an expected call of GetIsolationGroupByDomainID.
type PartitionConfig ¶
A PartitionConfig is the values passed in by a workflow on start for their partitioning
type Partitioner ¶
type Partitioner interface { // GetIsolationGroupByDomainID gets where the task workflow should be executing. Largely used by Matching // when determining which isolationGroup to place the tasks in. // Implementations ought to return (nil, nil) for when the feature is not enabled. GetIsolationGroupByDomainID(ctx context.Context, DomainID string, partitionKey PartitionConfig, availableIsolationGroups []string) (string, error) }
func NewDefaultPartitioner ¶
func NewDefaultPartitioner( logger log.Logger, isolationGroupState isolationgroup.State, ) Partitioner