flow_stream

package
v0.0.0-...-a06e19b Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxNumOfEOF        = 3
	NumEOFForReconnect = 2
)

Variables

This section is empty.

Functions

func ExtractFlowsRequest

func ExtractFlowsRequest(
	req *ui.GetEventsRequest,
) *observer.GetFlowsRequest

Types

type FlowStream

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

func NewDumb

func NewDumb() *FlowStream

func (*FlowStream) CollectLimit

func (h *FlowStream) CollectLimit(
	ctx context.Context,
	req *observer.GetFlowsRequest,
	limit int64,
) ([]*pbFlow.Flow, error)

func (*FlowStream) Errors

func (h *FlowStream) Errors() chan error

func (*FlowStream) Flows

func (h *FlowStream) Flows() chan *pbFlow.Flow

func (*FlowStream) Run

func (*FlowStream) Stop

func (h *FlowStream) Stop()

func (*FlowStream) Stopped

func (h *FlowStream) Stopped() chan struct{}

type FlowStreamInterface

type FlowStreamInterface interface {
	Run(ctx context.Context, req *observer.GetFlowsRequest)
	Stop()

	CollectLimit(context.Context, *observer.GetFlowsRequest, int64) ([]*pbFlow.Flow, error)

	Flows() chan *pbFlow.Flow
	Errors() chan error
	Stopped() chan struct{}
}

type StreamFn

type StreamFn = func(context.Context, int) (
	observer.Observer_GetFlowsClient,
	error,
)

Jump to

Keyboard shortcuts

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