clients

package
v0.0.0-...-17853a9 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Clients

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

NOTE: Every ref to subclient/substream is stored, to have a way to mutate their state in any moment in time

func NewInner

func NewInner(ctx context.Context, log logrus.FieldLogger) *Clients

func (*Clients) NSWatcher

func (*Clients) RelayClient

func (cl *Clients) RelayClient() relay_client.RelayClientInterface

func (*Clients) Reset

func (cl *Clients) Reset()

NOTE: You need to call this method between cypress tests to have a clear state

func (*Clients) SetFlowsRateLimit

func (cl *Clients) SetFlowsRateLimit(rl rate_limiter.RateLimit)

func (*Clients) SetSource

func (cl *Clients) SetSource(src sources.MockedSource)

type GRPCClient

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

func NewGRPCClient

func NewGRPCClient(log logrus.FieldLogger) *GRPCClient

func (*GRPCClient) CallOptions

func (g *GRPCClient) CallOptions(ctx context.Context) []grpc.CallOption

func (*GRPCClient) ConnStatusChannel

func (g *GRPCClient) ConnStatusChannel() *dllist.ListItem[grpc_client.StatusSub]

func (*GRPCClient) DialOptions

func (g *GRPCClient) DialOptions(ctx context.Context) ([]grpc.DialOption, error)

func (*GRPCClient) Reset

func (g *GRPCClient) Reset()

func (*GRPCClient) Tag

func (*GRPCClient) Validate

func (g *GRPCClient) Validate(p, q *grpc_client.ConnectionTag) bool

type HubbleClient

type HubbleClient struct {
	*GRPCClient
	// contains filtered or unexported fields
}

func NewHubbleClient

func NewHubbleClient(
	log logrus.FieldLogger,
	gcl *GRPCClient,
	src sources.MockedSource,
	flowsRateLimit rate_limiter.RateLimit,
) *HubbleClient

func (*HubbleClient) FlowStream

func (hcl *HubbleClient) FlowStream() flow_stream.FlowStreamInterface

func (*HubbleClient) Reset

func (hcl *HubbleClient) Reset()

func (*HubbleClient) ServerStatus

func (hcl *HubbleClient) ServerStatus(ctx context.Context) (*observer.ServerStatusResponse, error)

type RelayClient

type RelayClient struct {
	*GRPCClient
	*HubbleClient
	// contains filtered or unexported fields
}

func NewRelayClient

func NewRelayClient(
	log logrus.FieldLogger,
	gcl *GRPCClient,
	src sources.MockedSource,
	flowsRateLimit rate_limiter.RateLimit,
) *RelayClient

func (*RelayClient) Reset

func (rcl *RelayClient) Reset()

Jump to

Keyboard shortcuts

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