flow: github.com/gogap/flow Index | Files

package flow

import "github.com/gogap/flow"

Index

Package Files

flow.go handler.go output.go

func AppendOutput Uses

func AppendOutput(ctx context.Context, items ...NameValue)

func ListHandlers Uses

func ListHandlers() []string

func RegisterHandler Uses

func RegisterHandler(name string, handler HandlerFunc) (err error)

func Run Uses

func Run(name string, ctx context.Context, opts ...config.Option) (err error)

type Flow Uses

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

func New Uses

func New() *Flow

func (*Flow) Begin Uses

func (p *Flow) Begin(ctx context.Context, opts ...config.Option) *FlowTrans

func (*Flow) ListHandlers Uses

func (p *Flow) ListHandlers() []string

func (*Flow) RegisterHandler Uses

func (p *Flow) RegisterHandler(name string, handler HandlerFunc) (err error)

func (*Flow) Run Uses

func (p *Flow) Run(name string, ctx context.Context, opts ...config.Option) (err error)

type FlowTrans Uses

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

func Begin Uses

func Begin(ctx context.Context, opts ...config.Option) *FlowTrans

func (*FlowTrans) Commit Uses

func (p *FlowTrans) Commit() error

func (*FlowTrans) Output Uses

func (p *FlowTrans) Output() []NameValue

func (*FlowTrans) Subscribe Uses

func (p *FlowTrans) Subscribe(subscribers ...SubscriberFunc) *FlowTrans

func (*FlowTrans) Then Uses

func (p *FlowTrans) Then(name string, opts ...config.Option) *FlowTrans

type HandlerFunc Uses

type HandlerFunc func(context.Context, config.Configuration) error

func (HandlerFunc) Run Uses

func (p HandlerFunc) Run(ctx context.Context, conf config.Configuration) error

func (HandlerFunc) Subscribe Uses

func (p HandlerFunc) Subscribe(subscribers ...SubscriberFunc) HandlerFunc

func (HandlerFunc) Then Uses

func (p HandlerFunc) Then(next HandlerFunc, conf config.Configuration) HandlerFunc

type NameValue Uses

type NameValue struct {
    Name  string          `json:"name"`
    Value json.RawMessage `json:"value"`
    Tags  []string        `json:"tags,omitempty"`
}

func FindOutput Uses

func FindOutput(ctx context.Context, name string, tags ...string) []NameValue

func ListOutput Uses

func ListOutput(ctx context.Context) []NameValue

type Output Uses

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

func (*Output) Append Uses

func (p *Output) Append(items ...NameValue)

func (*Output) List Uses

func (p *Output) List() []NameValue

type SubscriberFunc Uses

type SubscriberFunc func(context.Context)

Package flow imports 6 packages (graph) and is imported by 1 packages. Updated 2018-06-12. Refresh now. Tools for package owners.