monitorclient

package
v0.0.0-...-228f33a Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: MIT Imports: 24 Imported by: 54

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBufferSize = 10

DefaultBufferSize sets the default buffer size per stream

Functions

This section is empty.

Types

type MonitorClient

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

MonitorClient is an overlay on top of the gRPC client

func NewMonitorClient

func NewMonitorClient(opts ...MonitorOption) *MonitorClient

NewMonitorClient returns a new MonitorClient

func (*MonitorClient) BrokerClient

func (m *MonitorClient) BrokerClient(ctx context.Context, opts ...grpc.CallOption) Stream

BrokerClient creates a new client for broker monitoring

func (*MonitorClient) GatewayClient

func (m *MonitorClient) GatewayClient(ctx context.Context, opts ...grpc.CallOption) Stream

GatewayClient creates a new client for Gateway monitoring

func (*MonitorClient) HandlerClient

func (m *MonitorClient) HandlerClient(ctx context.Context, opts ...grpc.CallOption) Stream

HandlerClient creates a new client for Handler monitoring

func (*MonitorClient) NetworkServerClient

func (m *MonitorClient) NetworkServerClient(ctx context.Context, opts ...grpc.CallOption) Stream

NetworkServerClient creates a new client for NetworkServer monitoring

func (*MonitorClient) RouterClient

func (m *MonitorClient) RouterClient(ctx context.Context, opts ...grpc.CallOption) Stream

RouterClient creates a new client for Router monitoring

type MonitorOption

type MonitorOption func(m *MonitorClient)

MonitorOption changes something in the MonitorClient

func WithConn

func WithConn(name string, conn *grpc.ClientConn) MonitorOption

WithConn adds the given conns to the MonitorClient

func WithServer

func WithServer(name, addr string, opts ...grpc.DialOption) MonitorOption

WithServer [DEPRECATED] connects to the given server and adds it to the MonitorClient Instead of using WithServer, you should set up the gRPC connection externally and use WithConn to add it to the MonitorClient.

type Stream

type Stream interface {
	Send(msg interface{})
	Open()
	Close()
	Reset()
}

Stream interface allows sending anything with Send()

Jump to

Keyboard shortcuts

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