workers

package
v0.8.4-1 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: BSD-2-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIHandler

type APIHandler interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request)
	Shutdown() error
}

type APIWorker

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

func NewAPIWorker

func NewAPIWorker(
	ctx context.Context, wg *sync.WaitGroup, app Application,
	id int, handler APIHandler) *APIWorker

func (APIWorker) Start

func (wrk APIWorker) Start()

func (APIWorker) String

func (wrk APIWorker) String() string

type Application

type Application interface {
	Cfg() *config.Config
}

type ArchiverWorker

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

func NewArchiverWorker

func NewArchiverWorker(
	ctx context.Context, wg *sync.WaitGroup, app Application,
	metricsQueue chan *helpers.VarnishMetrics,
	storage *storage.Storage) *ArchiverWorker

func (ArchiverWorker) Start

func (wrk ArchiverWorker) Start()

func (ArchiverWorker) String

func (wrk ArchiverWorker) String() string

type Manager

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

func NewManager

func NewManager(app Application) *Manager

func (*Manager) Start

func (m *Manager) Start()

func (*Manager) Stop

func (m *Manager) Stop()

type MockAPIHandler

type MockAPIHandler struct {
	mock.Mock
}

MockAPIHandler is an autogenerated mock type for the APIHandler type

func NewMockAPIHandler

func NewMockAPIHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockAPIHandler

NewMockAPIHandler creates a new instance of MockAPIHandler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockAPIHandler) ServeHTTP

func (_m *MockAPIHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP provides a mock function with given fields: w, r

func (*MockAPIHandler) Shutdown

func (_m *MockAPIHandler) Shutdown() error

Shutdown provides a mock function with no fields

type MockApplication

type MockApplication struct {
	mock.Mock
}

MockApplication is an autogenerated mock type for the Application type

func NewMockApplication

func NewMockApplication(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockApplication

NewMockApplication creates a new instance of MockApplication. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockApplication) Cfg

func (_m *MockApplication) Cfg() *config.Config

Cfg provides a mock function with no fields

type ScraperWorker

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

func NewScraperWorker

func NewScraperWorker(
	ctx context.Context, wg *sync.WaitGroup, app Application,
	metricsQueue chan *helpers.VarnishMetrics) *ScraperWorker

func (ScraperWorker) Start

func (wrk ScraperWorker) Start()

func (ScraperWorker) String

func (wrk ScraperWorker) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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