launcher

package
v0.0.0-...-fb54fd9 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorGracefulExit = beat.GracefulExit

ErrorGracefulExit is used when the launcher stops before shutdownGracePeriod, after waiting for the beater to stop

View Source
var ErrorStopSignal = errors.New("stop beater")

ErrorStopSignal is used to indicate we got a stop signal

View Source
var ErrorTimeoutExit = errors.New("exit after timeout")

ErrorTimeoutExit is used when the launcher stops after shutdownGracePeriod, without waiting for the beater to stop

Functions

func New

func New(log *logp.Logger, name string, reloader Reloader, validator Validator, creator beat.Creator, cfg *config.C) beat.Beater

Types

type BeaterUnhealthyError

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

BeaterUnhealthyError error is an error that is designed to have an information that can help to end user to operate cloudbeat health issues. For example, when a cloudbeat configuration is invalid, the error will include more information about what is missing/expected and might have links to external sources as well

func NewUnhealthyError

func NewUnhealthyError(msg string) BeaterUnhealthyError

func (BeaterUnhealthyError) Error

func (c BeaterUnhealthyError) Error() string

type Listener

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

func NewListener

func NewListener(log *logp.Logger) *Listener

func (*Listener) Channel

func (l *Listener) Channel() <-chan *config.C

func (*Listener) Reload

func (l *Listener) Reload(configs []*reload.ConfigWithMeta) error

func (*Listener) Stop

func (l *Listener) Stop()

type MockReloader

type MockReloader struct {
	mock.Mock
}

MockReloader is an autogenerated mock type for the Reloader type

func NewMockReloader

func NewMockReloader(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockReloader

NewMockReloader creates a new instance of MockReloader. 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 (*MockReloader) Channel

func (_m *MockReloader) Channel() <-chan *config.C

Channel provides a mock function with given fields:

func (*MockReloader) EXPECT

func (_m *MockReloader) EXPECT() *MockReloader_Expecter

func (*MockReloader) Stop

func (_m *MockReloader) Stop()

Stop provides a mock function with given fields:

type MockReloader_Channel_Call

type MockReloader_Channel_Call struct {
	*mock.Call
}

MockReloader_Channel_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Channel'

func (*MockReloader_Channel_Call) Return

func (*MockReloader_Channel_Call) Run

func (*MockReloader_Channel_Call) RunAndReturn

func (_c *MockReloader_Channel_Call) RunAndReturn(run func() <-chan *config.C) *MockReloader_Channel_Call

type MockReloader_Expecter

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

func (*MockReloader_Expecter) Channel

Channel is a helper method to define mock.On call

func (*MockReloader_Expecter) Stop

Stop is a helper method to define mock.On call

type MockReloader_Stop_Call

type MockReloader_Stop_Call struct {
	*mock.Call
}

MockReloader_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'

func (*MockReloader_Stop_Call) Return

func (*MockReloader_Stop_Call) Run

func (_c *MockReloader_Stop_Call) Run(run func()) *MockReloader_Stop_Call

func (*MockReloader_Stop_Call) RunAndReturn

func (_c *MockReloader_Stop_Call) RunAndReturn(run func()) *MockReloader_Stop_Call

type MockValidator

type MockValidator struct {
	mock.Mock
}

MockValidator is an autogenerated mock type for the Validator type

func NewMockValidator

func NewMockValidator(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockValidator

NewMockValidator creates a new instance of MockValidator. 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 (*MockValidator) EXPECT

func (_m *MockValidator) EXPECT() *MockValidator_Expecter

func (*MockValidator) Validate

func (_m *MockValidator) Validate(_a0 *config.C) error

Validate provides a mock function with given fields: _a0

type MockValidator_Expecter

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

func (*MockValidator_Expecter) Validate

func (_e *MockValidator_Expecter) Validate(_a0 interface{}) *MockValidator_Validate_Call

Validate is a helper method to define mock.On call

  • _a0 *config.C

type MockValidator_Validate_Call

type MockValidator_Validate_Call struct {
	*mock.Call
}

MockValidator_Validate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Validate'

func (*MockValidator_Validate_Call) Return

func (*MockValidator_Validate_Call) Run

func (*MockValidator_Validate_Call) RunAndReturn

type Reloader

type Reloader interface {
	Channel() <-chan *config.C
	Stop()
}

type Validator

type Validator interface {
	Validate(*config.C) error
}

Jump to

Keyboard shortcuts

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