ghm

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 20 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleConsumer added in v0.1.1

type ConsoleConsumer[R any] struct {
	Converter func(R) any
}

func (*ConsoleConsumer[R]) Close added in v0.1.1

func (cc *ConsoleConsumer[R]) Close() error

func (*ConsoleConsumer[R]) Consume added in v0.1.1

func (cc *ConsoleConsumer[R]) Consume(v R) error

func (*ConsoleConsumer[R]) Init added in v0.1.1

func (cc *ConsoleConsumer[R]) Init(d bool) error

func (*ConsoleConsumer[R]) Setup added in v0.1.1

func (cc *ConsoleConsumer[R]) Setup(cmd *cobra.Command, name string)

type Consumer added in v0.1.0

type Consumer[R any] interface {
	Setup(*cobra.Command, string)
	Init(bool) error
	Consume(v R) error
	Close() error
}

Consumer is generic consumer

type Entry added in v0.1.2

type Entry map[string]any

type Executor added in v0.1.0

type Executor interface {
	Main()
}

Executor to be obtained via NewExecutor

func NewExecutor added in v0.1.0

func NewExecutor[R any](name string, p Producer[R], c ...Consumer[R]) Executor

type HassioConsumer added in v0.1.0

type HassioConsumer[R any] struct {
	Converter func(R) any
	OnConnect func(client MQTT.Client, topic, topicc, topica string)
	// contains filtered or unexported fields
}

func (*HassioConsumer[R]) Close added in v0.1.0

func (hc *HassioConsumer[R]) Close() error

func (*HassioConsumer[R]) Consume added in v0.1.0

func (hc *HassioConsumer[R]) Consume(v R) error

func (*HassioConsumer[R]) Init added in v0.1.0

func (hc *HassioConsumer[R]) Init(debug bool) error

func (*HassioConsumer[R]) Setup added in v0.1.0

func (hc *HassioConsumer[R]) Setup(cmd *cobra.Command, name string)

type HttpServer added in v0.1.0

type HttpServer[R any] struct {
	ToJsonConverter func(R) any
	ToRawConverter  func(R) Entry
	YAxis           []string
	// contains filtered or unexported fields
}

func (*HttpServer[R]) Close added in v0.1.0

func (ht *HttpServer[R]) Close() error

func (*HttpServer[R]) Consume added in v0.1.0

func (ht *HttpServer[R]) Consume(v R) error

func (*HttpServer[R]) Init added in v0.1.0

func (ht *HttpServer[R]) Init(d bool) error

func (*HttpServer[R]) Setup added in v0.1.0

func (ht *HttpServer[R]) Setup(cmd *cobra.Command, name string)

type IndexModel added in v0.1.2

type IndexModel struct {
	Yaxis string
	Marks []string
}

type MemoryConsumer added in v0.1.0

type MemoryConsumer[R any] struct {
	// contains filtered or unexported fields
}

func (*MemoryConsumer[R]) Close added in v0.1.0

func (mc *MemoryConsumer[R]) Close() error

func (*MemoryConsumer[R]) Consume added in v0.1.0

func (mc *MemoryConsumer[R]) Consume(v R) error

func (MemoryConsumer[R]) Data added in v0.1.2

func (mc MemoryConsumer[R]) Data(c ...func(R) Entry) []Entry

func (*MemoryConsumer[R]) Init added in v0.1.0

func (mc *MemoryConsumer[R]) Init(d bool) error

func (MemoryConsumer[R]) Last added in v0.1.0

func (mc MemoryConsumer[R]) Last() R

func (*MemoryConsumer[R]) Setup added in v0.1.0

func (mc *MemoryConsumer[R]) Setup(cmd *cobra.Command, name string)

type Producer added in v0.1.0

type Producer[R any] interface {
	Setup(*cobra.Command, string)
	Init(bool) error
	Produce() (R, error)
	Close() error
}

Producer is a generic producer

Jump to

Keyboard shortcuts

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