features

package
v0.0.0-...-4ca9756 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func EnableStreamFeatures

func EnableStreamFeatures(s stream.ServerStream, name string)

func NewDependencyGraph

func NewDependencyGraph() depGraph

Types

type BasicFeature

type BasicFeature interface {
	NewHandler() FeatureHandler
}

type FF

type FF interface {
	Add(string, *FeatureFactoryElement)
	Get(string) *FeatureFactoryElement
	List() map[string]*FeatureFactoryElement
}
var FeatureFactory FF = newFactory()

type Feature

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

func NewFeature

func NewFeature(name string, felement BasicFeature, required bool, conf Options) *Feature

func (*Feature) Handle

func (fw *Feature) Handle(strm stream.ServerStream, opts Options) error

func (*Feature) InitHandler

func (fw *Feature) InitHandler() xtream.Element

func (*Feature) MarshalXML

func (fw *Feature) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

func (*Feature) Name

func (fw *Feature) Name() string

func (*Feature) Required

func (fw *Feature) Required() bool

func (*Feature) UnmarshalXML

func (fw *Feature) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type FeatureConstructor

type FeatureConstructor func(Options) *Feature

type FeatureFactoryElement

type FeatureFactoryElement struct {
	Constructor FeatureConstructor
	Config      interface{}
	Name        xml.Name
	Parent      xml.Name
	Wants       []string
}

func (*FeatureFactoryElement) GetConfig

func (ffe *FeatureFactoryElement) GetConfig(conf json.RawMessage) (interface{}, error)

type FeatureHandler

type FeatureHandler interface {
	Handle(stream.ServerStream, Options) error
}

type Options

type Options interface{}

Jump to

Keyboard shortcuts

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