process

package
v0.0.0-...-5e3c6cd Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package process is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"leader-process",
	fx.Provide(NewProcessorFactory),
)

Module provides processor factory for fx app.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	// CreateProcessor creates a new processor, it takes the generic store
	// and the election object which provides the transactional guard.
	CreateProcessor(cfg config.Namespace, storage store.Store, election store.Election) Processor
}

Factory creates processor instances

func NewProcessorFactory

func NewProcessorFactory(
	logger log.Logger,
	metricsClient metrics.Client,
	timeSource clock.TimeSource,
	cfg config.ShardDistribution,
	sdConfig *config.Config,
) Factory

NewProcessorFactory creates a new processor factory

type MockFactory

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

MockFactory is a mock of Factory interface.

func NewMockFactory

func NewMockFactory(ctrl *gomock.Controller) *MockFactory

NewMockFactory creates a new mock instance.

func (*MockFactory) CreateProcessor

func (m *MockFactory) CreateProcessor(cfg config.Namespace, storage store.Store, election store.Election) Processor

CreateProcessor mocks base method.

func (*MockFactory) EXPECT

func (m *MockFactory) EXPECT() *MockFactoryMockRecorder

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

type MockFactoryMockRecorder

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

MockFactoryMockRecorder is the mock recorder for MockFactory.

func (*MockFactoryMockRecorder) CreateProcessor

func (mr *MockFactoryMockRecorder) CreateProcessor(cfg, storage, election any) *gomock.Call

CreateProcessor indicates an expected call of CreateProcessor.

type MockProcessor

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

MockProcessor is a mock of Processor interface.

func NewMockProcessor

func NewMockProcessor(ctrl *gomock.Controller) *MockProcessor

NewMockProcessor creates a new mock instance.

func (*MockProcessor) EXPECT

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

func (*MockProcessor) Run

func (m *MockProcessor) Run(ctx context.Context) error

Run mocks base method.

func (*MockProcessor) Terminate

func (m *MockProcessor) Terminate(ctx context.Context) error

Terminate mocks base method.

type MockProcessorMockRecorder

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

MockProcessorMockRecorder is the mock recorder for MockProcessor.

func (*MockProcessorMockRecorder) Run

func (mr *MockProcessorMockRecorder) Run(ctx any) *gomock.Call

Run indicates an expected call of Run.

func (*MockProcessorMockRecorder) Terminate

func (mr *MockProcessorMockRecorder) Terminate(ctx any) *gomock.Call

Terminate indicates an expected call of Terminate.

type Processor

type Processor interface {
	Run(ctx context.Context) error
	Terminate(ctx context.Context) error
}

Processor represents a process that runs when the instance is the leader

Jump to

Keyboard shortcuts

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