worker

package
v0.0.0-...-e2755d2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	Variant      string // kafka or pulsar
	BrokerConfig messagebroker.BrokerConfig
}

Broker Config (Kafka/Pulsar)

type Config

type Config struct {
	Broker     Broker
	Interfaces struct {
		API NetworkInterfaces
	}
	HTTPClientConfig httpclient.Config
	SchedulerConfig  tasks.Config
}

Config for pushconsumer

type NetworkInterfaces

type NetworkInterfaces struct {
	GrpcServerAddress         string
	HTTPServerAddress         string
	InternalHTTPServerAddress string
}

NetworkInterfaces contains all exposed interfaces

type SchedulerConfig

type SchedulerConfig struct {
	NodeBindingRefreshTickerMins int
}

SchedulerConfig contains all scheduler config

type Service

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

Service for worker

func NewService

func NewService(workerConfig *Config, registryConfig *registry.Config, cacheConfig *cache.Config) (*Service, error)

NewService creates an instance of new worker

func (*Service) GetErrorChannel

func (svc *Service) GetErrorChannel() chan error

GetErrorChannel returns service error channel

func (*Service) Start

func (svc *Service) Start(ctx context.Context) error

Start implements all the tasks for worker and waits until one of the task fails

Jump to

Keyboard shortcuts

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