v0

package
v0.0.0-...-fab637b Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	Ref() ComponentRef
	Type() ComponentType
}

Component is the abstract representative of an object in the topology

type ComponentFactory

type ComponentFactory interface {
	// CreateComponent creates a component
	CreateComponent(ComponentRef) (Component, error)
}

ComponentFactory creates components

type ComponentRef

type ComponentRef interface {
	// ComponentID retrieves the ID of current component
	ComponentID() string
	// MessagePath is the path for dispatching message to this component
	MessagePath() string
	// ComponentConfig retrieves configuration for the component
	ComponentConfig() map[string]interface{}
	// Injections retrieves resolved injections
	Injections() map[string]interface{}
	// Component retrieves created component
	Component() Component
	// Parent retrieves parent component ref
	Parent() ComponentRef
	// Children retrieves child component refs
	Children() []ComponentRef
}

ComponentRef is a reference to the component

type ComponentType

type ComponentType interface {
	// Factory returns the ComponentFactory
	Factory() ComponentFactory
	// Name returns component type name
	Name() string
	// Description returns detailed description of the type
	// CONVENTION: the first line is the summary
	Description() string
}

ComponentType is the type of components

type ComponentTypeRegistry

type ComponentTypeRegistry interface {
	ComponentTypeResolver
	RegisterComponentType(componentType ComponentType)
	RegisteredComponentTypes() []ComponentType
}

ComponentTypeRegistry registers component types

var DefaultComponentTypeRegistry ComponentTypeRegistry = make(mapRegistry)

DefaultComponentTypeRegistry is the default

type ComponentTypeResolver

type ComponentTypeResolver interface {
	ResolveComponentType(name string) (ComponentType, error)
}

ComponentTypeResolver resolves instance type by name

type LifecycleCtl

type LifecycleCtl interface {
	Start() error
	Stop() error
}

LifecycleCtl provides start/stop control

type Stateful

type Stateful interface {
	Endpoints() []mqhub.Endpoint
}

Stateful defines instances which publishes endpoints

Jump to

Keyboard shortcuts

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