common

package
v1.21.5-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package common is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DedicatedWorkerOptions

type DedicatedWorkerOptions struct {
	// TaskQueue is optional
	TaskQueue string
	// How many worker nodes should run a worker per namespace
	NumWorkers int
	// Other worker options
	Options sdkworker.Options
}

type MockPerNSWorkerComponent added in v1.17.0

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

MockPerNSWorkerComponent is a mock of PerNSWorkerComponent interface.

func NewMockPerNSWorkerComponent added in v1.17.0

func NewMockPerNSWorkerComponent(ctrl *gomock.Controller) *MockPerNSWorkerComponent

NewMockPerNSWorkerComponent creates a new mock instance.

func (*MockPerNSWorkerComponent) DedicatedWorkerOptions added in v1.17.0

func (m *MockPerNSWorkerComponent) DedicatedWorkerOptions(arg0 *namespace.Namespace) *PerNSDedicatedWorkerOptions

DedicatedWorkerOptions mocks base method.

func (*MockPerNSWorkerComponent) EXPECT added in v1.17.0

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

func (*MockPerNSWorkerComponent) Register added in v1.17.0

Register mocks base method.

type MockPerNSWorkerComponentMockRecorder added in v1.17.0

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

MockPerNSWorkerComponentMockRecorder is the mock recorder for MockPerNSWorkerComponent.

func (*MockPerNSWorkerComponentMockRecorder) DedicatedWorkerOptions added in v1.17.0

func (mr *MockPerNSWorkerComponentMockRecorder) DedicatedWorkerOptions(arg0 interface{}) *gomock.Call

DedicatedWorkerOptions indicates an expected call of DedicatedWorkerOptions.

func (*MockPerNSWorkerComponentMockRecorder) Register added in v1.17.0

func (mr *MockPerNSWorkerComponentMockRecorder) Register(arg0, arg1, arg2 interface{}) *gomock.Call

Register indicates an expected call of Register.

type MockWorkerComponent added in v1.17.0

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

MockWorkerComponent is a mock of WorkerComponent interface.

func NewMockWorkerComponent added in v1.17.0

func NewMockWorkerComponent(ctrl *gomock.Controller) *MockWorkerComponent

NewMockWorkerComponent creates a new mock instance.

func (*MockWorkerComponent) DedicatedWorkerOptions added in v1.17.0

func (m *MockWorkerComponent) DedicatedWorkerOptions() *DedicatedWorkerOptions

DedicatedWorkerOptions mocks base method.

func (*MockWorkerComponent) EXPECT added in v1.17.0

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

func (*MockWorkerComponent) Register added in v1.17.0

func (m *MockWorkerComponent) Register(arg0 worker.Worker)

Register mocks base method.

type MockWorkerComponentMockRecorder added in v1.17.0

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

MockWorkerComponentMockRecorder is the mock recorder for MockWorkerComponent.

func (*MockWorkerComponentMockRecorder) DedicatedWorkerOptions added in v1.17.0

func (mr *MockWorkerComponentMockRecorder) DedicatedWorkerOptions() *gomock.Call

DedicatedWorkerOptions indicates an expected call of DedicatedWorkerOptions.

func (*MockWorkerComponentMockRecorder) Register added in v1.17.0

func (mr *MockWorkerComponentMockRecorder) Register(arg0 interface{}) *gomock.Call

Register indicates an expected call of Register.

type PerNSDedicatedWorkerOptions added in v1.17.0

type PerNSDedicatedWorkerOptions struct {
	// Set this to false to disable this worker for this namespace
	Enabled bool
}

type PerNSWorkerComponent added in v1.17.0

type PerNSWorkerComponent interface {
	// Register registers Workflow and Activity types provided by this worker component.
	// The namespace that this worker is running in is also provided.
	Register(sdkworker.Worker, *namespace.Namespace, RegistrationDetails)
	// DedicatedWorkerOptions returns a PerNSDedicatedWorkerOptions for this worker component.
	DedicatedWorkerOptions(*namespace.Namespace) *PerNSDedicatedWorkerOptions
}

PerNSWorkerComponent represents a per-namespace worker needed for worker role

type RegistrationDetails added in v1.20.0

type RegistrationDetails struct {
	// TotalWorkers is the number of requested per-namespace workers for this namespace.
	TotalWorkers int
	// Multiplicity is the number of those workers that this particular sdkworker.Worker
	// represents. It may be more than one if the requested number is more than the total
	// number of worker nodes or if consistent hashing decided to place more than one on
	// the same node.
	Multiplicity int
}

type WorkerComponent

type WorkerComponent interface {
	// Register registers Workflow and Activity types provided by this worker component.
	Register(sdkworker.Worker)
	// DedicatedWorkerOptions returns a DedicatedWorkerOptions for this worker component.
	// Return nil to use default worker instance.
	DedicatedWorkerOptions() *DedicatedWorkerOptions
}

WorkerComponent represents a type of work needed for worker role

Jump to

Keyboard shortcuts

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