Documentation
¶
Index ¶
- Variables
- func RegisterPeerServer(s grpc.ServiceRegistrar, srv PeerServer)
- type ChangeNotification
- func (*ChangeNotification) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeNotification) GetAddress() string
- func (x *ChangeNotification) GetName() string
- func (x *ChangeNotification) GetTls() *TLS
- func (x *ChangeNotification) GetType() ChangeNotificationType
- func (msg *ChangeNotification) MarshalJSON() ([]byte, error)
- func (*ChangeNotification) ProtoMessage()
- func (x *ChangeNotification) ProtoReflect() protoreflect.Message
- func (x *ChangeNotification) Reset()
- func (x *ChangeNotification) String() string
- func (msg *ChangeNotification) UnmarshalJSON(b []byte) error
- type ChangeNotificationType
- func (ChangeNotificationType) Descriptor() protoreflect.EnumDescriptor
- func (x ChangeNotificationType) Enum() *ChangeNotificationType
- func (ChangeNotificationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ChangeNotificationType) Number() protoreflect.EnumNumber
- func (x ChangeNotificationType) String() string
- func (ChangeNotificationType) Type() protoreflect.EnumType
- type NotifyRequest
- func (*NotifyRequest) Descriptor() ([]byte, []int)deprecated
- func (msg *NotifyRequest) MarshalJSON() ([]byte, error)
- func (*NotifyRequest) ProtoMessage()
- func (x *NotifyRequest) ProtoReflect() protoreflect.Message
- func (x *NotifyRequest) Reset()
- func (x *NotifyRequest) String() string
- func (msg *NotifyRequest) UnmarshalJSON(b []byte) error
- type PeerClient
- type PeerServer
- type Peer_NotifyClient
- type Peer_NotifyServer
- type TLS
- func (*TLS) Descriptor() ([]byte, []int)deprecated
- func (x *TLS) GetServerName() string
- func (msg *TLS) MarshalJSON() ([]byte, error)
- func (*TLS) ProtoMessage()
- func (x *TLS) ProtoReflect() protoreflect.Message
- func (x *TLS) Reset()
- func (x *TLS) String() string
- func (msg *TLS) UnmarshalJSON(b []byte) error
- type UnimplementedPeerServer
- type UnsafePeerServer
Constants ¶
This section is empty.
Variables ¶
var ( ChangeNotificationType_name = map[int32]string{ 0: "UNKNOWN", 1: "PEER_ADDED", 2: "PEER_DELETED", 3: "PEER_UPDATED", } ChangeNotificationType_value = map[string]int32{ "UNKNOWN": 0, "PEER_ADDED": 1, "PEER_DELETED": 2, "PEER_UPDATED": 3, } )
Enum value maps for ChangeNotificationType.
var File_peer_peer_proto protoreflect.FileDescriptor
var Peer_ServiceDesc = grpc.ServiceDesc{ ServiceName: "peer.Peer", HandlerType: (*PeerServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Notify", Handler: _Peer_Notify_Handler, ServerStreams: true, }, }, Metadata: "peer/peer.proto", }
Peer_ServiceDesc is the grpc.ServiceDesc for Peer service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPeerServer ¶
func RegisterPeerServer(s grpc.ServiceRegistrar, 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"`
// TLS provides information to connect to the Address with TLS enabled.
// If not set, TLS shall be assumed to be disabled.
Tls *TLS `protobuf:"bytes,4,opt,name=tls,proto3" json:"tls,omitempty"`
// contains filtered or unexported fields
}
ChangeNotification indicates a change regarding a hubble peer.
func (*ChangeNotification) Descriptor
deprecated
func (*ChangeNotification) Descriptor() ([]byte, []int)
Deprecated: Use ChangeNotification.ProtoReflect.Descriptor instead.
func (*ChangeNotification) GetAddress ¶
func (x *ChangeNotification) GetAddress() string
func (*ChangeNotification) GetName ¶
func (x *ChangeNotification) GetName() string
func (*ChangeNotification) GetTls ¶
func (x *ChangeNotification) GetTls() *TLS
func (*ChangeNotification) GetType ¶
func (x *ChangeNotification) GetType() ChangeNotificationType
func (*ChangeNotification) MarshalJSON ¶
func (msg *ChangeNotification) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ChangeNotification) ProtoMessage ¶
func (*ChangeNotification) ProtoMessage()
func (*ChangeNotification) ProtoReflect ¶
func (x *ChangeNotification) ProtoReflect() protoreflect.Message
func (*ChangeNotification) Reset ¶
func (x *ChangeNotification) Reset()
func (*ChangeNotification) String ¶
func (x *ChangeNotification) String() string
func (*ChangeNotification) UnmarshalJSON ¶
func (msg *ChangeNotification) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
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) Descriptor ¶
func (ChangeNotificationType) Descriptor() protoreflect.EnumDescriptor
func (ChangeNotificationType) Enum ¶
func (x ChangeNotificationType) Enum() *ChangeNotificationType
func (ChangeNotificationType) EnumDescriptor
deprecated
func (ChangeNotificationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ChangeNotificationType.Descriptor instead.
func (ChangeNotificationType) Number ¶
func (x ChangeNotificationType) Number() protoreflect.EnumNumber
func (ChangeNotificationType) String ¶
func (x ChangeNotificationType) String() string
func (ChangeNotificationType) Type ¶
func (ChangeNotificationType) Type() protoreflect.EnumType
type NotifyRequest ¶
type NotifyRequest struct {
// contains filtered or unexported fields
}
func (*NotifyRequest) Descriptor
deprecated
func (*NotifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use NotifyRequest.ProtoReflect.Descriptor instead.
func (*NotifyRequest) MarshalJSON ¶
func (msg *NotifyRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*NotifyRequest) ProtoMessage ¶
func (*NotifyRequest) ProtoMessage()
func (*NotifyRequest) ProtoReflect ¶
func (x *NotifyRequest) ProtoReflect() protoreflect.Message
func (*NotifyRequest) Reset ¶
func (x *NotifyRequest) Reset()
func (*NotifyRequest) String ¶
func (x *NotifyRequest) String() string
func (*NotifyRequest) UnmarshalJSON ¶
func (msg *NotifyRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewPeerClient ¶
func NewPeerClient(cc grpc.ClientConnInterface) 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. All implementations should embed UnimplementedPeerServer for forward compatibility
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 TLS ¶
type TLS struct {
// ServerName is used to verify the hostname on the returned certificate.
ServerName string `protobuf:"bytes,1,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
// contains filtered or unexported fields
}
TLS provides information to establish a TLS connection to the peer.
func (*TLS) Descriptor
deprecated
func (*TLS) GetServerName ¶
func (*TLS) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*TLS) ProtoMessage ¶
func (*TLS) ProtoMessage()
func (*TLS) ProtoReflect ¶
func (x *TLS) ProtoReflect() protoreflect.Message
func (*TLS) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type UnimplementedPeerServer ¶
type UnimplementedPeerServer struct {
}
UnimplementedPeerServer should be embedded to have forward compatible implementations.
func (UnimplementedPeerServer) Notify ¶
func (UnimplementedPeerServer) Notify(*NotifyRequest, Peer_NotifyServer) error
type UnsafePeerServer ¶
type UnsafePeerServer interface {
// contains filtered or unexported methods
}
UnsafePeerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PeerServer will result in compilation errors.