cli

package
v0.0.0-...-cb4d464 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package cli provides the query capabilities for streaming telemetry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSubscribeProto

func ParseSubscribeProto(p string) (client.Query, error)

ParseSubscribeProto parses given gNMI SubscribeRequest text proto into client.Query.

func QueryDisplay

func QueryDisplay(ctx context.Context, query client.Query, cfg *Config) error

QueryDisplay constructs a query from the supplied arguments (target, queries, queryType), sends as an RPC to the specified destination address and displays results with the supplied display function.

func QueryType

func QueryType(t string) client.Type

QueryType returns a client query type for t after trying aliases for the type.

Types

type Config

type Config struct {
	PollingInterval   time.Duration // Duration between polling events.
	StreamingDuration time.Duration // Duration to collect updates, 0 is forever.
	Count             uint          // Number of polling/streaming events, 0 is infinite.

	Delimiter     string       // Delimiter between path elements when converted to string.
	Display       func([]byte) // Function called to display each result.
	DisplayPrefix string       // Prefix for each line of result output.
	DisplayIndent string       // Indent per nesting level of result output.
	DisplayType   string       // Display results in selected format, grouped, single, proto, graph.
	DisplayPeer   bool         // Display the immediate connected peer.
	// <empty string> - disable timestamp
	// on - human readable timestamp according to layout
	// raw - int64 nanos since epoch
	// <FORMAT> - human readable timestamp according to <FORMAT>
	Timestamp     string // Formatting of timestamp in result output.
	DisplaySize   bool
	Latency       bool     // Show latency to client
	ClientTypes   []string // List of client types to try.
	Concurrent    uint     // Number of concurrent client connections to server, for graph display type only.
	ConcurrentMax uint     // Double number of concurrent client connections until MaxConcurrent reached.
	// contains filtered or unexported fields
}

Config is a type to hold parameters that affect how the cli sends and displays results.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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