runner

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GQL

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

func NewGQLRunner

func NewGQLRunner(server http.Handler) *GQL

func (*GQL) Ext

func (g *GQL) Ext() string

func (*GQL) Run

func (g *GQL) Run(ctx context.Context, logf func(format string, args ...any), body []byte, state map[string]any) error

type PubSub

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

func NewPubSub

func NewPubSub(doPublish PubSubHook) *PubSub

func (*PubSub) Ext

func (p *PubSub) Ext() string

func (*PubSub) Receive

func (p *PubSub) Receive(topic string, msg PubSubMessage)

func (*PubSub) Run

func (p *PubSub) Run(ctx context.Context, logf func(format string, args ...any), body []byte, state map[string]any) error

func (*PubSub) Send

func (p *PubSub) Send(topic string, msg PubSubMessage)

type PubSubHook

type PubSubHook func(topic string, msg PubSubMessage) error

type PubSubMessage

type PubSubMessage struct {
	Msg        map[string]any    `json:"msg"`
	Attributes map[string]string `json:"attributes"`
}

type PubSubTopic

type PubSubTopic struct {
	Sent     []PubSubMessage
	Received []PubSubMessage
}

type REST

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

func NewRestRunner

func NewRestRunner(server http.Handler) *REST

func (*REST) Ext

func (r *REST) Ext() string

func (*REST) Run

func (r *REST) Run(ctx context.Context, logf func(format string, args ...any), body []byte, state map[string]any) error

type SQL

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

func NewSQLRunner

func NewSQLRunner(db *pgxpool.Pool) *SQL

func (*SQL) Ext

func (s *SQL) Ext() string

func (*SQL) Run

func (s *SQL) Run(ctx context.Context, logf func(format string, args ...any), body []byte, state map[string]any) error

Jump to

Keyboard shortcuts

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