metathings_deviced_flow

package
v1.1.26 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownFlowFactory    = errors.New("unknown flow factory")
	ErrUnknownFlowSetFactory = errors.New("unknown flow set factory")
)

Functions

This section is empty.

Types

type Flow

type Flow interface {
	Id() string
	Device() string
	PushFrame(*pb.Frame) error
	PullFrame() (<-chan *pb.Frame, chan struct{})
	QueryFrame(...*FlowFilter) ([]*pb.Frame, error)
	Close() error
}

type FlowFactory

type FlowFactory interface {
	New(*FlowOption) (Flow, error)
}

func NewFlowFactory

func NewFlowFactory(name string, args ...interface{}) (FlowFactory, error)

type FlowFilter

type FlowFilter struct {
	BeginAt time.Time
	EndAt   time.Time
}

type FlowOption

type FlowOption struct {
	FlowId   string
	DeviceId string
}

type FlowSet added in v1.1.23

type FlowSet interface {
	Id() string
	PushFrame(*FlowSetFrame) error
	PullFrame() (<-chan *FlowSetFrame, chan struct{})
	Close() error
}

type FlowSetFactory added in v1.1.23

type FlowSetFactory interface {
	New(*FlowSetOption) (FlowSet, error)
}

func NewFlowSetFactory added in v1.1.23

func NewFlowSetFactory(name string, args ...interface{}) (FlowSetFactory, error)

type FlowSetFrame added in v1.1.23

type FlowSetFrame struct {
	Device *pb.Device `json:"device"`
	Frame  *pb.Frame  `json:"frame"`
}

type FlowSetOption added in v1.1.23

type FlowSetOption struct {
	FlowSetId string
}

type RedisStreamFlowSet added in v1.1.23

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

func (*RedisStreamFlowSet) Close added in v1.1.23

func (rsfs *RedisStreamFlowSet) Close() (err error)

func (*RedisStreamFlowSet) Id added in v1.1.23

func (rsfs *RedisStreamFlowSet) Id() string

func (*RedisStreamFlowSet) PullFrame added in v1.1.23

func (rsfs *RedisStreamFlowSet) PullFrame() (<-chan *FlowSetFrame, chan struct{})

func (*RedisStreamFlowSet) PushFrame added in v1.1.23

func (rsfs *RedisStreamFlowSet) PushFrame(flwst_frm *FlowSetFrame) error

type RedisStreamFlowSetFactory added in v1.1.23

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

func (*RedisStreamFlowSetFactory) New added in v1.1.23

type RedisStreamFlowSetFactoryOption added in v1.1.23

type RedisStreamFlowSetFactoryOption struct {
	RedisStreamAddr        string
	RedisStreamDB          int
	RedisStreamPassword    string
	RedisStreamPoolInitial int
	RedisStreamPoolMax     int
}

type RedisStreamFlowSetOption added in v1.1.23

type RedisStreamFlowSetOption struct {
	Id string
}

Jump to

Keyboard shortcuts

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