Documentation ¶
Index ¶
- Variables
- type AfterConstructor
- type AfterConstructorHandler
- type Collection
- type Option
- func WithAfterConstructor(wrapper AfterConstructorHandler) Option
- func WithDiscovery(definition providers.ServiceDiscoveryClientsResolver) Option
- func WithEndpoints(definition providers.EndpointsResolver) Option
- func WithListener(listener transport.NewListener) Option
- func WithSchema(resolver providers.SchemaResolver) Option
- func WithServices(definition providers.ServicesResolver) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
var ( HCLExtensionType = "application/hcl" JSONExtensionType = "application/json" )
Common file extension types
Functions ¶
This section is empty.
Types ¶
type AfterConstructor ¶
type AfterConstructor func(*broker.Context, specs.FlowListInterface, specs.EndpointList, specs.ServiceList, specs.Schemas) error
AfterConstructor is called after the specifications is constructored
type AfterConstructorHandler ¶
type AfterConstructorHandler func(AfterConstructor) AfterConstructor
AfterConstructorHandler wraps the after constructed function to allow middleware to be chained
type Collection ¶
type Collection struct { specs.FlowListInterface specs.EndpointList specs.ServiceList specs.Schemas specs.ServiceDiscoveryClients }
Collection represents a collection of specification lists and objects. These objects could be used to initialize a Semaphore broker.
func Resolve ¶
func Resolve(ctx *broker.Context, mem functions.Collection, options Options) (Collection, error)
Resolve collects and constructs the a specs from the given options. The specifications are received from the providers. The property types are defined and functions are prepared. Once done is a specs collection returned that could be used to update the listeners.
type Option ¶
Option represents a constructor func which sets a given option
func WithAfterConstructor ¶
func WithAfterConstructor(wrapper AfterConstructorHandler) Option
WithAfterConstructor the passed function gets called once all options have been applied
func WithDiscovery ¶
func WithDiscovery(definition providers.ServiceDiscoveryClientsResolver) Option
func WithEndpoints ¶
func WithEndpoints(definition providers.EndpointsResolver) Option
WithEndpoints appends the given endpoint resolver to the available endpoint resolvers
func WithListener ¶
func WithListener(listener transport.NewListener) Option
WithListener appends the given listener to the collection of available listeners
func WithSchema ¶
func WithSchema(resolver providers.SchemaResolver) Option
WithSchema appends the schema collection to the schema store
func WithServices ¶
func WithServices(definition providers.ServicesResolver) Option
WithServices appends the given service resolver to the available service resolvers
type Options ¶
type Options struct { semaphore.Options Listeners transport.ListenerList EndpointResolvers providers.EndpointResolvers ServiceResolvers providers.ServiceResolvers SchemaResolvers providers.SchemaResolvers AfterConstructor AfterConstructor DiscoveryServiceResolvers providers.ServiceDiscoveryClientsResolvers }
Options represents the available options to resolve the given providers