runner

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMonitorEchoHook

func DefaultMonitorEchoHook(rn *Runner, e *echo.Echo) error

func FirebaseHook

func FirebaseHook(rn *Runner) error

func MongoHook

func MongoHook(rn *Runner) error

func PostgresHook

func PostgresHook(rn *Runner) error

func RedisHook

func RedisHook(rn *Runner) error

Types

type Hook

type Hook = func(*Runner) error

Hook to add stuff to RunnerRuntime

type MigrationHook

type MigrationHook = func() (string, string, error)

type MonitorServerHook

type MonitorServerHook = func(*Runner, *echo.Echo) error

type RestServerHook

type RestServerHook = func(*Runner, *echo.Echo, *echo.Group) error

type Runner

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

func NewRunner

func NewRunner(options ...RunnerOption) *Runner

func (*Runner) AddDatabaseMigrationHook

func (r *Runner) AddDatabaseMigrationHook(name string, h Hook)

func (*Runner) AddInfraHook

func (r *Runner) AddInfraHook(name string, h Hook)

func (*Runner) AddRunHook

func (r *Runner) AddRunHook(name string, h Hook)

func (*Runner) AddShutdownHook

func (r *Runner) AddShutdownHook(name string, h Hook)

func (*Runner) AddStartupHook

func (r *Runner) AddStartupHook(name string, h Hook)

func (*Runner) AddSubscriberHook

func (r *Runner) AddSubscriberHook(name string, h Hook)

func (*Runner) GetInfra

func (r *Runner) GetInfra() *infra.Infra

func (*Runner) Run

func (r *Runner) Run()

type RunnerOption

type RunnerOption = func(*Runner)

func BuildMonitorServerOption

func BuildMonitorServerOption(msh MonitorServerHook) RunnerOption

func BuildPostgresDatabaseMigrationHook

func BuildPostgresDatabaseMigrationHook(mh MigrationHook) RunnerOption

func BuildRestServerOption

func BuildRestServerOption(rsh RestServerHook) RunnerOption

func BuildSubscribeHook

func BuildSubscribeHook(sh SubscriberHook) RunnerOption

func NewDatabaseMigrationHookOption

func NewDatabaseMigrationHookOption(name string, h Hook) RunnerOption

func NewInfraHookOption

func NewInfraHookOption(name string, h Hook) RunnerOption

func NewRunHookOption

func NewRunHookOption(name string, h Hook) RunnerOption

func NewShutdownHookOption

func NewShutdownHookOption(name string, h Hook) RunnerOption

func NewStartupHookOption

func NewStartupHookOption(name string, h Hook) RunnerOption

func NewSubscriberHookOption

func NewSubscriberHookOption(name string, h Hook) RunnerOption

type SubscriberHook

type SubscriberHook = func(*Runner) error

Jump to

Keyboard shortcuts

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