peer

package
v1.8.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: Apache-2.0 Imports: 18 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ChangeNotificationType_name = map[int32]string{
	0: "UNKNOWN",
	1: "PEER_ADDED",
	2: "PEER_DELETED",
	3: "PEER_UPDATED",
}
View Source
var ChangeNotificationType_value = map[string]int32{
	"UNKNOWN":      0,
	"PEER_ADDED":   1,
	"PEER_DELETED": 2,
	"PEER_UPDATED": 3,
}

Functions

func RegisterPeerServer

func RegisterPeerServer(s *grpc.Server, srv PeerServer)

Types

type ChangeNotification

type ChangeNotification 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 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Address is the address of the peer's gRPC service.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// ChangeNotificationType indicates the type of change, ie whether the peer
	// was added, deleted or updated.
	Type                 ChangeNotificationType `protobuf:"varint,3,opt,name=type,proto3,enum=peer.ChangeNotificationType" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

ChangeNotification indicates a change regarding a hubble peer.

func (*ChangeNotification) Descriptor

func (*ChangeNotification) Descriptor() ([]byte, []int)

func (*ChangeNotification) GetAddress

func (m *ChangeNotification) GetAddress() string

func (*ChangeNotification) GetName

func (m *ChangeNotification) GetName() string

func (*ChangeNotification) GetType

func (*ChangeNotification) MarshalJSON

func (msg *ChangeNotification) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*ChangeNotification) ProtoMessage

func (*ChangeNotification) ProtoMessage()

func (*ChangeNotification) Reset

func (m *ChangeNotification) Reset()

func (*ChangeNotification) String

func (m *ChangeNotification) String() string

func (*ChangeNotification) UnmarshalJSON

func (msg *ChangeNotification) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*ChangeNotification) Validate added in v1.8.0

func (m *ChangeNotification) Validate() error

Validate checks the field values on ChangeNotification with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*ChangeNotification) XXX_DiscardUnknown added in v1.8.0

func (m *ChangeNotification) XXX_DiscardUnknown()

func (*ChangeNotification) XXX_Marshal added in v1.8.0

func (m *ChangeNotification) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeNotification) XXX_Merge added in v1.8.0

func (m *ChangeNotification) XXX_Merge(src proto.Message)

func (*ChangeNotification) XXX_Size added in v1.8.0

func (m *ChangeNotification) XXX_Size() int

func (*ChangeNotification) XXX_Unmarshal added in v1.8.0

func (m *ChangeNotification) XXX_Unmarshal(b []byte) error

type ChangeNotificationType

type ChangeNotificationType int32

ChangeNotificationType defines the peer change notification type.

const (
	ChangeNotificationType_UNKNOWN      ChangeNotificationType = 0
	ChangeNotificationType_PEER_ADDED   ChangeNotificationType = 1
	ChangeNotificationType_PEER_DELETED ChangeNotificationType = 2
	ChangeNotificationType_PEER_UPDATED ChangeNotificationType = 3
)

func (ChangeNotificationType) EnumDescriptor

func (ChangeNotificationType) EnumDescriptor() ([]byte, []int)

func (ChangeNotificationType) String

func (x ChangeNotificationType) String() string

type ChangeNotificationValidationError added in v1.8.0

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

ChangeNotificationValidationError is the validation error returned by ChangeNotification.Validate if the designated constraints aren't met.

func (ChangeNotificationValidationError) Cause added in v1.8.0

Cause function returns cause value.

func (ChangeNotificationValidationError) Error added in v1.8.0

Error satisfies the builtin error interface

func (ChangeNotificationValidationError) ErrorName added in v1.8.0

ErrorName returns error name.

func (ChangeNotificationValidationError) Field added in v1.8.0

Field function returns field value.

func (ChangeNotificationValidationError) Key added in v1.8.0

Key function returns key value.

func (ChangeNotificationValidationError) Reason added in v1.8.0

Reason function returns reason value.

type NotifyRequest

type NotifyRequest struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NotifyRequest) Descriptor

func (*NotifyRequest) Descriptor() ([]byte, []int)

func (*NotifyRequest) MarshalJSON

func (msg *NotifyRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*NotifyRequest) ProtoMessage

func (*NotifyRequest) ProtoMessage()

func (*NotifyRequest) Reset

func (m *NotifyRequest) Reset()

func (*NotifyRequest) String

func (m *NotifyRequest) String() string

func (*NotifyRequest) UnmarshalJSON

func (msg *NotifyRequest) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*NotifyRequest) Validate added in v1.8.0

func (m *NotifyRequest) Validate() error

Validate checks the field values on NotifyRequest with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*NotifyRequest) XXX_DiscardUnknown added in v1.8.0

func (m *NotifyRequest) XXX_DiscardUnknown()

func (*NotifyRequest) XXX_Marshal added in v1.8.0

func (m *NotifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NotifyRequest) XXX_Merge added in v1.8.0

func (m *NotifyRequest) XXX_Merge(src proto.Message)

func (*NotifyRequest) XXX_Size added in v1.8.0

func (m *NotifyRequest) XXX_Size() int

func (*NotifyRequest) XXX_Unmarshal added in v1.8.0

func (m *NotifyRequest) XXX_Unmarshal(b []byte) error

type NotifyRequestValidationError added in v1.8.0

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

NotifyRequestValidationError is the validation error returned by NotifyRequest.Validate if the designated constraints aren't met.

func (NotifyRequestValidationError) Cause added in v1.8.0

Cause function returns cause value.

func (NotifyRequestValidationError) Error added in v1.8.0

Error satisfies the builtin error interface

func (NotifyRequestValidationError) ErrorName added in v1.8.0

func (e NotifyRequestValidationError) ErrorName() string

ErrorName returns error name.

func (NotifyRequestValidationError) Field added in v1.8.0

Field function returns field value.

func (NotifyRequestValidationError) Key added in v1.8.0

Key function returns key value.

func (NotifyRequestValidationError) Reason added in v1.8.0

Reason function returns reason value.

type PeerClient

type PeerClient interface {
	// Notify sends information about hubble peers in the cluster.
	// When Notify is called, it sends information about all the peers that are
	// already part of the cluster (with the type as PEER_ADDED). It
	// subsequently notifies of any change.
	Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (Peer_NotifyClient, error)
}

PeerClient is the client API for Peer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewPeerClient

func NewPeerClient(cc *grpc.ClientConn) PeerClient

type PeerServer

type PeerServer interface {
	// Notify sends information about hubble peers in the cluster.
	// When Notify is called, it sends information about all the peers that are
	// already part of the cluster (with the type as PEER_ADDED). It
	// subsequently notifies of any change.
	Notify(*NotifyRequest, Peer_NotifyServer) error
}

PeerServer is the server API for Peer service.

type Peer_NotifyClient

type Peer_NotifyClient interface {
	Recv() (*ChangeNotification, error)
	grpc.ClientStream
}

type Peer_NotifyServer

type Peer_NotifyServer interface {
	Send(*ChangeNotification) error
	grpc.ServerStream
}

type UnimplementedPeerServer

type UnimplementedPeerServer struct {
}

UnimplementedPeerServer can be embedded to have forward compatible implementations.

func (*UnimplementedPeerServer) Notify

Jump to

Keyboard shortcuts

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