adapter

package
v0.0.0-...-9ec53df Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 InputData

type InputData struct {
	EventName string      `json:"event"`
	Payload   interface{} `json:"payload"`
}

type Packet

type Packet struct {
	EventName string
	Payload   []byte
}

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 {
	URI string `json:"uri"`
}

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