manager

package
v1.1.54 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package manager is a generated GoMock package.

Index

Constants

View Source
const (
	BeforeHook = HookName("before")
	AfterHook  = HookName("after")
)
View Source
const (
	DefaultReaderConcurrency   = 50
	DefaultImporterConcurrency = 512
	DefaultStatsInterval       = time.Second * 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct {
	Statements []string      `yaml:"statements" json:"statements,omitempty,optional"`
	Wait       time.Duration `yaml:"wait,omitempty" json:"wait,omitempty,optional"`
}

type HookName

type HookName string

type Hooks

type Hooks struct {
	Before []*Hook `yaml:"before,omitempty" json:"before,omitempty,optional"`
	After  []*Hook `yaml:"after,omitempty" json:"after,omitempty,optional"`
}

type Manager

type Manager interface {
	Import(s source.Source, brr reader.BatchRecordReader, importers ...importer.Importer) error
	Start() error
	Wait() error
	Stats() *stats.Stats
	Stop() error
}

func New

func New(pool client.Pool, opts ...Option) Manager

func NewWithOpts

func NewWithOpts(opts ...Option) Manager

type MockManager

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

MockManager is a mock of Manager interface.

func NewMockManager

func NewMockManager(ctrl *gomock.Controller) *MockManager

NewMockManager creates a new mock instance.

func (*MockManager) EXPECT

func (m *MockManager) EXPECT() *MockManagerMockRecorder

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

func (*MockManager) Import

func (m *MockManager) Import(s source.Source, brr reader.BatchRecordReader, importers ...importer.Importer) error

Import mocks base method.

func (*MockManager) Start

func (m *MockManager) Start() error

Start mocks base method.

func (*MockManager) Stats

func (m *MockManager) Stats() *stats.Stats

Stats mocks base method.

func (*MockManager) Stop

func (m *MockManager) Stop() error

Stop mocks base method.

func (*MockManager) Wait

func (m *MockManager) Wait() error

Wait mocks base method.

type MockManagerMockRecorder

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

MockManagerMockRecorder is the mock recorder for MockManager.

func (*MockManagerMockRecorder) Import

func (mr *MockManagerMockRecorder) Import(s, brr interface{}, importers ...interface{}) *gomock.Call

Import indicates an expected call of Import.

func (*MockManagerMockRecorder) Start

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

Start indicates an expected call of Start.

func (*MockManagerMockRecorder) Stats

func (mr *MockManagerMockRecorder) Stats() *gomock.Call

Stats indicates an expected call of Stats.

func (*MockManagerMockRecorder) Stop

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

Stop indicates an expected call of Stop.

func (*MockManagerMockRecorder) Wait

func (mr *MockManagerMockRecorder) Wait() *gomock.Call

Wait indicates an expected call of Wait.

type Option

type Option func(*defaultManager)

func WithAfterHooks

func WithAfterHooks(hooks ...*Hook) Option

func WithBatch

func WithBatch(batch int) Option

func WithBeforeHooks

func WithBeforeHooks(hooks ...*Hook) Option

func WithClientPool

func WithClientPool(pool client.Pool) Option

func WithGetClientOptions

func WithGetClientOptions(opts ...client.Option) Option

func WithGraphName

func WithGraphName(graphName string) Option

func WithImporterConcurrency

func WithImporterConcurrency(concurrency int) Option

func WithLogger

func WithLogger(l logger.Logger) Option

func WithReaderConcurrency

func WithReaderConcurrency(concurrency int) Option

func WithRecordStats added in v1.1.12

func WithRecordStats(recordStats bool) Option

func WithStatsInterval

func WithStatsInterval(statsInterval time.Duration) Option

Jump to

Keyboard shortcuts

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