client

package
v0.0.0-...-d002785 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package client provides helper functions for OpenConfig CLI tools.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFlags

func ParseFlags() (username string, password string,
	subscriptions, addrs []string,
	opts []grpc.DialOption)

ParseFlags registers some additional common flags, parses the flags, and returns the resulting gRPC options, and other settings to connect to the gRPC interface.

func Run

func Run(publish func(*openconfig.SubscribeResponse), wg *sync.WaitGroup,
	username, password, addr string, subscriptions []string,
	opts []grpc.DialOption)

Run creates a new gRPC client, sends subscriptions, and consumes responses. The given publish function is used to publish SubscribeResponses received for the given subscriptions, when connected to the given host, with the given user/pass pair, or the client-side cert specified in the gRPC opts. This function does not normally return so it should probably be run in its own goroutine. When this function returns, the given WaitGroup is marked as done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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