input

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package input is a generated GoMock package.

Package input is a generated GoMock package.

Index

Constants

View Source
const Subsystem = "inputs"

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultInputManager

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

func NewDefaultInputManager

func NewDefaultInputManager(config config.Config) *DefaultInputManager

func (*DefaultInputManager) GetInputResources

func (manager *DefaultInputManager) GetInputResources(name string) (*InputResource, error)

func (*DefaultInputManager) InitInputs

func (manager *DefaultInputManager) InitInputs() error

func (*DefaultInputManager) StartInputs

func (manager *DefaultInputManager) StartInputs()

func (*DefaultInputManager) StopInputs

func (manager *DefaultInputManager) StopInputs()

type InfluxClient

type InfluxClient interface {
	Ping(timeout time.Duration) (time.Duration, string, error)

	Query(q client.Query) (*client.Response, error)

	Close() error
}

type InfluxClientMock

type InfluxClientMock struct {
}

func NewInfluxClientMock

func NewInfluxClientMock() *InfluxClientMock

func (*InfluxClientMock) Close

func (influxMock *InfluxClientMock) Close() error

func (*InfluxClientMock) Ping

func (influxMock *InfluxClientMock) Ping(timeout time.Duration) (time.Duration, string, error)

func (*InfluxClientMock) Query

func (influxMock *InfluxClientMock) Query(q client.Query) (*client.Response, error)

type InfluxInput

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

func NewInfluxInput

func NewInfluxInput(config config.InfluxInputConfig, commandChan chan message.Command, resultChan chan message.Result) (*InfluxInput, error)

func (*InfluxInput) Init

func (input *InfluxInput) Init() error

func (*InfluxInput) Start

func (input *InfluxInput) Start()

func (*InfluxInput) Stop

func (input *InfluxInput) Stop() error

type Input

type Input interface {
	Init() error
	Start()
	Stop() error
}

type InputManager

type InputManager interface {
	InitInputs() error
	GetInputResources(string) (*InputResource, error)
	StartInputs()
	StopInputs()
}

type InputResource

type InputResource struct {
	Input       Input
	ResultChan  chan message.Result
	CommandChan chan message.Command
}

func NewInputResource

func NewInputResource() InputResource

type KafkaConsumer

type KafkaConsumer interface {
	ConsumePartition(topic string, partition int32, offset int64) (sarama.PartitionConsumer, error)
	Close() error
}

type KafkaConsumerMock

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

func NewKafkaConsumerMock

func NewKafkaConsumerMock() *KafkaConsumerMock

func (*KafkaConsumerMock) Close

func (consumer *KafkaConsumerMock) Close() error

func (*KafkaConsumerMock) ConsumePartition

func (consumer *KafkaConsumerMock) ConsumePartition(topic string, partition int32, offset int64) (sarama.PartitionConsumer, error)

type KafkaInput

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

func NewKafkaInput

func NewKafkaInput(config config.KafkaInputConfig, commandChan chan message.Command, resultChan chan message.Result) *KafkaInput

func (*KafkaInput) Init

func (input *KafkaInput) Init() error

func (*KafkaInput) Start

func (input *KafkaInput) Start()

func (*KafkaInput) StartListening

func (input *KafkaInput) StartListening()

func (*KafkaInput) Stop

func (input *KafkaInput) Stop() error

func (*KafkaInput) UnmarshalTelemetryMessage

func (input *KafkaInput) UnmarshalTelemetryMessage(msg *sarama.ConsumerMessage) (*message.TelemetryMessage, error)

type KafkaParitionConsumer

type KafkaParitionConsumer interface {
	Close() error
	Messages() <-chan *sarama.ConsumerMessage
	Errors() <-chan *sarama.ConsumerError
}

type KafkaParitionConsumerMock

type KafkaParitionConsumerMock struct {
	ReturnError bool
	// contains filtered or unexported fields
}

func NewKafkaParitionConsumerMock

func NewKafkaParitionConsumerMock() *KafkaParitionConsumerMock

func (*KafkaParitionConsumerMock) Close

func (partitionConsumer *KafkaParitionConsumerMock) Close() error

func (*KafkaParitionConsumerMock) Errors

func (partitionConsumer *KafkaParitionConsumerMock) Errors() <-chan *sarama.ConsumerError

func (*KafkaParitionConsumerMock) Messages

func (partitionConsumer *KafkaParitionConsumerMock) Messages() <-chan *sarama.ConsumerMessage

type MockInput

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

MockInput is a mock of Input interface.

func NewMockInput

func NewMockInput(ctrl *gomock.Controller) *MockInput

NewMockInput creates a new mock instance.

func (*MockInput) EXPECT

func (m *MockInput) EXPECT() *MockInputMockRecorder

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

func (*MockInput) Init

func (m *MockInput) Init() error

Init mocks base method.

func (*MockInput) Start

func (m *MockInput) Start()

Start mocks base method.

func (*MockInput) Stop

func (m *MockInput) Stop() error

Stop mocks base method.

type MockInputManager

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

MockInputManager is a mock of InputManager interface.

func NewMockInputManager

func NewMockInputManager(ctrl *gomock.Controller) *MockInputManager

NewMockInputManager creates a new mock instance.

func (*MockInputManager) EXPECT

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

func (*MockInputManager) GetInputResources

func (m *MockInputManager) GetInputResources(arg0 string) (*InputResource, error)

GetInputResources mocks base method.

func (*MockInputManager) InitInputs

func (m *MockInputManager) InitInputs() error

InitInputs mocks base method.

func (*MockInputManager) StartInputs

func (m *MockInputManager) StartInputs()

StartInputs mocks base method.

func (*MockInputManager) StopInputs

func (m *MockInputManager) StopInputs()

StopInputs mocks base method.

type MockInputManagerMockRecorder

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

MockInputManagerMockRecorder is the mock recorder for MockInputManager.

func (*MockInputManagerMockRecorder) GetInputResources

func (mr *MockInputManagerMockRecorder) GetInputResources(arg0 any) *gomock.Call

GetInputResources indicates an expected call of GetInputResources.

func (*MockInputManagerMockRecorder) InitInputs

func (mr *MockInputManagerMockRecorder) InitInputs() *gomock.Call

InitInputs indicates an expected call of InitInputs.

func (*MockInputManagerMockRecorder) StartInputs

func (mr *MockInputManagerMockRecorder) StartInputs() *gomock.Call

StartInputs indicates an expected call of StartInputs.

func (*MockInputManagerMockRecorder) StopInputs

func (mr *MockInputManagerMockRecorder) StopInputs() *gomock.Call

StopInputs indicates an expected call of StopInputs.

type MockInputMockRecorder

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

MockInputMockRecorder is the mock recorder for MockInput.

func (*MockInputMockRecorder) Init

func (mr *MockInputMockRecorder) Init() *gomock.Call

Init indicates an expected call of Init.

func (*MockInputMockRecorder) Start

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

Start indicates an expected call of Start.

func (*MockInputMockRecorder) Stop

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

Stop indicates an expected call of Stop.

Jump to

Keyboard shortcuts

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