types

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	peerpb.PeerClient
	io.Closer
}

Client defines an interface that Peer service client should implement.

type ClientBuilder

type ClientBuilder interface {
	// Client builds a new Client that connects to the given target.
	Client(target string) (Client, error)
}

ClientBuilder creates a new Client.

type LocalClientBuilder

type LocalClientBuilder struct {
	DialTimeout time.Duration
}

LocalClientBuilder is a ClientBuilder that is suitable when the gRPC connection to the Peer service is local (typically a Unix Domain Socket).

func (LocalClientBuilder) Client

func (b LocalClientBuilder) Client(target string) (Client, error)

Client implements ClientBuilder.Client.

type Peer

type Peer struct {
	// Name is the name of the peer, typically the hostname. The name includes
	// the cluster name if a value other than default has been specified.
	// This value can be used to uniquely identify the host.
	// When the cluster name is not the default, the cluster name is prepended
	// to the peer name and a forward slash is added.
	//
	// Examples:
	//  - runtime1
	//  - testcluster/runtime1
	Name string

	// Address is the address of the peer's gRPC service.
	Address net.Addr

	// TLSEnabled indicates whether the service offered by the peer has TLS
	// enabled.
	TLSEnabled bool

	// TLSServerName is the name the TLS certificate should be matched to.
	TLSServerName string
}

Peer represents a hubble peer.

func FromChangeNotification

func FromChangeNotification(cn *peerpb.ChangeNotification) *Peer

FromChangeNotification creates a new Peer from a ChangeNotification.

func (Peer) String

func (p Peer) String() string

String implements fmt's Stringer interface.

Jump to

Keyboard shortcuts

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