registry

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, constructor NewJourneyFunc, defaultConfig interface{})

func Registered

func Registered() []string

Types

type Journey

type Journey struct {
	Constructor   NewJourneyFunc
	DefaultConfig interface{}
}

func Get

func Get(name string) (*Journey, error)

type NewJourneyFunc

type NewJourneyFunc func(config.CommonJourney) (http.Handler, error)

type Registry

type Registry struct {
	Journeys map[string]*Journey
}

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Get

func (r *Registry) Get(name string) (*Journey, error)

func (*Registry) Register

func (r *Registry) Register(name string, constructor NewJourneyFunc, defaultConfig interface{})

func (*Registry) Registered

func (r *Registry) Registered() []string

Jump to

Keyboard shortcuts

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