common

package
v0.0.0-...-6fa03d5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package common defines operations that are used within the gNMITest framework for multiple tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, a *tpb.Connection) (gpb.GNMIClient, func(), error)

Connect opens a new gRPC connection to the target speciifed by the ConnectionArgs. It returns the gNMI Client connection, and a function which can be called to close the connection. If an error is encountered during opening the connection, it is returned.

func ContextWithAuth

func ContextWithAuth(ctx context.Context, creds *resolver.Credentials) context.Context

ContextWithAuth adds authentication details from the supplied credentials to ctx.

func ListenerTCPPort

func ListenerTCPPort(n net.Listener) (uint64, error)

ListenerTCPPort returns the TCP port that is associated with the listener provided.

func ResolveCredentials

func ResolveCredentials(ctx context.Context, c *tpb.Connection) (*resolver.Credentials, error)

ResolveCredentials takes an input Connection protobuf message and resolves the credentials within it using the resolver library.

Types

This section is empty.

Directories

Path Synopsis
Package report contains common helpers to process report proto messages.
Package report contains common helpers to process report proto messages.
Package testerror contains List type that implements error interface.
Package testerror contains List type that implements error interface.

Jump to

Keyboard shortcuts

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