introspect

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package introspect provides an API to introspect grpc binding connections.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer added in v0.4.7

type Dialer struct {
	DialFunc   func(context.Context, string, ...grpc.DialOption) (*grpc.ClientConn, error)
	DialTarget string
	DialOpts   []grpc.DialOption
	DevicePort int
}

Dialer is capable of dialing grpc endpoints.

func ATEDialer added in v0.4.7

func ATEDialer(t testing.TB, ate *ondatra.ATEDevice, service Service) *Dialer

ATEDialer returns the grpc dialer for the specified ATE service. It fails if the device does not meet the Introspector interface or if the connection details cannot be retrieved.

func DUTDialer added in v0.4.7

func DUTDialer(t testing.TB, dut *ondatra.DUTDevice, service Service) *Dialer

DUTDialer returns the grpc dialer for the specified DUT service. It fails if the device does not meet the Introspector interface or if the connection details cannot be retrieved.

func (*Dialer) Dial added in v0.4.7

func (d *Dialer) Dial(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)

Dial dials a gRPC connection using the provided connection details.

type Introspector

type Introspector interface {
	Dialer(Service) (*Dialer, error)
}

Introspector is an interface to introspect grpc service dialers.

type Service

type Service string

Service is a grpc service. The package includes an enumeration of well-known open source services, but bindings may define their own services.

const (
	GNMI  Service = "gNMI"
	GNOI  Service = "gNOI"
	GNPSI Service = "gNPSI"
	GNSI  Service = "gNSI"
	GRIBI Service = "gRIBI"
	OTG   Service = "OTG"
	P4RT  Service = "P4RT"
)

Enumeration of well-known open source services.

Jump to

Keyboard shortcuts

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