subscriber

package
v0.0.0-...-8f19d2a Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packet

type Packet struct {
	EventName  string                 `json:"event"`
	Collection string                 `json:"collection"`
	Payload    map[string]interface{} `json:"payload"`
	Meta       map[string]interface{} `json:"meta"`
}

type RestRule

type RestRule struct {
	Method  string            `json:"method"`
	Uri     string            `json:"uri"`
	Headers map[string]string `json:"headers"`
}

type RuleConfig

type RuleConfig struct {
	Subscriptions SubscriptionConfig `json:"subscriptions"`
}

type Subscriber

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

func NewSubscriber

func NewSubscriber(a app.App) *Subscriber

func (*Subscriber) Init

func (subscriber *Subscriber) Init() error

func (*Subscriber) InitStateStore

func (subscriber *Subscriber) InitStateStore() error

func (*Subscriber) LoadConfigFile

func (subscriber *Subscriber) LoadConfigFile(filename string) (*RuleConfig, error)

func (*Subscriber) Run

func (subscriber *Subscriber) Run() error

type SubscriptionConfig

type SubscriptionConfig map[string][]RestRule

Jump to

Keyboard shortcuts

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