metathings_deviced_flow

package
v1.2.15 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 22 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")
	ErrGetAliveRedisClientMaxRetry = errors.New("get alive redis client max retry")
)

Functions

This section is empty.

Types

type Flow

type Flow interface {
	Id() string
	Device() string
	PushFrame(*pb.Frame) error
	PullFrame() <-chan *pb.Frame
	QueryFrame(...*FlowFilter) ([]*pb.Frame, error)
	Err() 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
	Err() error
	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) Err added in v1.1.27

func (rsfs *RedisStreamFlowSet) 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

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

	ReadStreamGroupBlockTime time.Duration
	StreamExpireTime         time.Duration
	StreamTrimLimit          int64
	StreamTrimProb           float32
}

func NewRedisStreamFlowSetOption added in v1.2.0

func NewRedisStreamFlowSetOption(id string) *RedisStreamFlowSetOption

Jump to

Keyboard shortcuts

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