adapter

package
v0.0.0-...-3b0633c Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultWorkerCount int = 8

Default settings

Functions

func StrToBytes

func StrToBytes(s string) []byte

Types

type Adapter

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

func NewAdapter

func NewAdapter(a app.App) *Adapter

func (*Adapter) Init

func (adapter *Adapter) Init() error

type Packet

type Packet struct {
	EventName string
	Payload   []byte
	Offset    int64
}

type Source

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

func NewSource

func NewSource(adapter *Adapter, name string, sourceInfo *SourceInfo) *Source

func (*Source) HandleRequest

func (source *Source) HandleRequest(request *Packet)

func (*Source) Init

func (source *Source) Init() error

func (*Source) InitSubscription

func (source *Source) InitSubscription() error

type SourceConfig

type SourceConfig struct {
	Sources map[string]SourceInfo `json:"sources"`
}

type SourceInfo

type SourceInfo struct {
	Hosts       []string `json:"hosts"`
	Topic       string   `json:"topic"`
	GroupId     string   `json:"groupId"`
	WorkerCount *int     `json:"worker_count,omitempty"`
}

type SourceManager

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

func NewSourceManager

func NewSourceManager(adapter *Adapter) *SourceManager

func (*SourceManager) Initialize

func (sm *SourceManager) Initialize() error

func (*SourceManager) LoadSourceConfig

func (sm *SourceManager) LoadSourceConfig(filename string) (*SourceConfig, error)

Jump to

Keyboard shortcuts

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