multiplexer

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

This package provides a multiplexer for combine one or more gRPC event streams into a single stream. Useful for running the eventchecker across multiple gRPC connections simultaneously, for example in a multi-node cluster.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectAttempt added in v1.4.1

func ConnectAttempt(ctx context.Context, addr string) (*grpc.ClientConn, error)

Types

type ClientMultiplexer

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

ClientMultiplexer multiplexes one or more GetEvents clients into a single stream

func NewClientMultiplexer

func NewClientMultiplexer() *ClientMultiplexer

NewClientMultiplexer constructs a new ClientMultiplexer.

func (*ClientMultiplexer) GetEvents

func (cm *ClientMultiplexer) GetEvents(ctx context.Context, allowList, denyList []*tetragon.Filter) (chan GetEventsResult, error)

GetEventsWithFilters calls GetEvents for each client in the multiplexer and returns a channel that multiplexes the GetEventsResponses. allowList and denyList can be used to filter what events we care about.

func (*ClientMultiplexer) SetConns added in v1.4.1

func (cm *ClientMultiplexer) SetConns(conns []*grpc.ClientConn)

func (*ClientMultiplexer) WithConnectBackoff

func (cm *ClientMultiplexer) WithConnectBackoff(backoff time.Duration) *ClientMultiplexer

WithConnectBackoff updates the backoff time between connection attempts to each gRPC server. The default is 1 second.

func (*ClientMultiplexer) WithConnectRetries

func (cm *ClientMultiplexer) WithConnectRetries(retries uint) *ClientMultiplexer

WithConnectRetries updates the number of attempts this multiplexer will make to connect to each gRPC server. The default is 10.

type GetEventsResult

type GetEventsResult struct {
	*tetragon.GetEventsResponse
	Error error
}

GetEventsResult encapsulates a GetEventsResponse and an error

Jump to

Keyboard shortcuts

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