peer

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStreamSendBlocked = errors.New("server stream send was blocked for too long")

ErrStreamSendBlocked is returned by Notify when the send operation is blocked for too long, likely indicating a problem with the transport.

Functions

This section is empty.

Types

type Peer added in v1.8.0

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
}

Peer represents a hubble peer.

func FromChangeNotification added in v1.8.0

func FromChangeNotification(cn *peerpb.ChangeNotification) *Peer

FromChangeNotification creates a new Peer from a ChangeNotification.

func (Peer) String added in v1.8.0

func (p Peer) String() string

String implements fmt's Stringer interface.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service implements the peerpb.PeerServer gRPC service.

func NewService

func NewService(notifier manager.Notifier, options ...serviceoption.Option) *Service

NewService creates a new Service.

func (*Service) Close

func (s *Service) Close() error

Close frees resources associated to the Service.

func (*Service) Notify

func (s *Service) Notify(_ *peerpb.NotifyRequest, stream peerpb.Peer_NotifyServer) error

Notify implements peerpb.Peer_PeerServer.Notify. If the client is not able to process change notifications fast enough, the server will terminate the connection.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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