service

package
v0.0.0-...-f8c3f29 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App interface {
	SendMessage(ctx context.Context, topic, key string, payload interface{}) error
	RetrieveMessage(ctx context.Context, topic, group string) (map[string]interface{}, error)
	BulkRetrieve(ctx context.Context, topic, group string, max int) ([]map[string]interface{}, error)
}

func GetService

func GetService(conf config.Getter) (App, error)

type KafkaService

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

func NewKafkaService

func NewKafkaService(conf config.Getter) (*KafkaService, error)

func (*KafkaService) BulkRetrieve

func (k *KafkaService) BulkRetrieve(ctx context.Context, topic, group string, max int) ([]map[string]interface{}, error)

func (*KafkaService) RetrieveMessage

func (k *KafkaService) RetrieveMessage(ctx context.Context, topic, group string) (map[string]interface{}, error)

func (*KafkaService) SendMessage

func (k *KafkaService) SendMessage(ctx context.Context, topic, key string, payload interface{}) error

type PubsubService

type PubsubService struct {
	Config config.Getter
	// contains filtered or unexported fields
}

func NewPubsubService

func NewPubsubService(conf config.Getter) (*PubsubService, error)

func (*PubsubService) BulkRetrieve

func (a *PubsubService) BulkRetrieve(ctx context.Context, topic, group string, max int) ([]map[string]interface{}, error)

func (*PubsubService) RetrieveMessage

func (a *PubsubService) RetrieveMessage(ctx context.Context, topic, group string) (map[string]interface{}, error)

func (*PubsubService) SendMessage

func (a *PubsubService) SendMessage(ctx context.Context, topic, key string, payload interface{}) error

Jump to

Keyboard shortcuts

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