relay

package
v1.15.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 6

README

Protocol Documentation

Table of Contents

Top

relay/relay.proto

NodeStatusEvent

NodeStatusEvent is a message sent by hubble-relay to inform clients about the state of a particular node.

Field Type Label Description
state_change NodeState state_change contains the new node state
node_names string repeated node_names is the list of nodes for which the above state changes applies
message string message is an optional message attached to the state change (e.g. an error message). The message applies to all nodes in node_names.

NodeState
Name Number Description
UNKNOWN_NODE_STATE 0 UNKNOWN_NODE_STATE indicates that the state of this node is unknown.
NODE_CONNECTED 1 NODE_CONNECTED indicates that we have established a connection to this node. The client can expect to observe flows from this node.
NODE_UNAVAILABLE 2 NODE_UNAVAILABLE indicates that the connection to this node is currently unavailable. The client can expect to not see any flows from this node until either the connection is re-established or the node is gone.
NODE_GONE 3 NODE_GONE indicates that a node has been removed from the cluster. No reconnection attempts will be made.
NODE_ERROR 4 NODE_ERROR indicates that a node has reported an error while processing the request. No reconnection attempts will be made.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodeState_name = map[int32]string{
		0: "UNKNOWN_NODE_STATE",
		1: "NODE_CONNECTED",
		2: "NODE_UNAVAILABLE",
		3: "NODE_GONE",
		4: "NODE_ERROR",
	}
	NodeState_value = map[string]int32{
		"UNKNOWN_NODE_STATE": 0,
		"NODE_CONNECTED":     1,
		"NODE_UNAVAILABLE":   2,
		"NODE_GONE":          3,
		"NODE_ERROR":         4,
	}
)

Enum value maps for NodeState.

View Source
var File_relay_relay_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type NodeState

type NodeState int32
const (
	// UNKNOWN_NODE_STATE indicates that the state of this node is unknown.
	NodeState_UNKNOWN_NODE_STATE NodeState = 0
	// NODE_CONNECTED indicates that we have established a connection
	// to this node. The client can expect to observe flows from this node.
	NodeState_NODE_CONNECTED NodeState = 1
	// NODE_UNAVAILABLE indicates that the connection to this
	// node is currently unavailable. The client can expect to not see any
	// flows from this node until either the connection is re-established or
	// the node is gone.
	NodeState_NODE_UNAVAILABLE NodeState = 2
	// NODE_GONE indicates that a node has been removed from the
	// cluster. No reconnection attempts will be made.
	NodeState_NODE_GONE NodeState = 3
	// NODE_ERROR indicates that a node has reported an error while processing
	// the request. No reconnection attempts will be made.
	NodeState_NODE_ERROR NodeState = 4
)

func (NodeState) Descriptor

func (NodeState) Descriptor() protoreflect.EnumDescriptor

func (NodeState) Enum

func (x NodeState) Enum() *NodeState

func (NodeState) EnumDescriptor deprecated

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

Deprecated: Use NodeState.Descriptor instead.

func (NodeState) Number

func (x NodeState) Number() protoreflect.EnumNumber

func (NodeState) String

func (x NodeState) String() string

func (NodeState) Type

type NodeStatusEvent

type NodeStatusEvent struct {

	// state_change contains the new node state
	StateChange NodeState `protobuf:"varint,1,opt,name=state_change,json=stateChange,proto3,enum=relay.NodeState" json:"state_change,omitempty"`
	// node_names is the list of nodes for which the above state changes applies
	NodeNames []string `protobuf:"bytes,2,rep,name=node_names,json=nodeNames,proto3" json:"node_names,omitempty"`
	// message is an optional message attached to the state change (e.g. an
	// error message). The message applies to all nodes in node_names.
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

NodeStatusEvent is a message sent by hubble-relay to inform clients about the state of a particular node.

func (*NodeStatusEvent) Descriptor deprecated

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

Deprecated: Use NodeStatusEvent.ProtoReflect.Descriptor instead.

func (*NodeStatusEvent) GetMessage

func (x *NodeStatusEvent) GetMessage() string

func (*NodeStatusEvent) GetNodeNames

func (x *NodeStatusEvent) GetNodeNames() []string

func (*NodeStatusEvent) GetStateChange

func (x *NodeStatusEvent) GetStateChange() NodeState

func (*NodeStatusEvent) MarshalJSON

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

MarshalJSON implements json.Marshaler

func (*NodeStatusEvent) ProtoMessage

func (*NodeStatusEvent) ProtoMessage()

func (*NodeStatusEvent) ProtoReflect

func (x *NodeStatusEvent) ProtoReflect() protoreflect.Message

func (*NodeStatusEvent) Reset

func (x *NodeStatusEvent) Reset()

func (*NodeStatusEvent) String

func (x *NodeStatusEvent) String() string

func (*NodeStatusEvent) UnmarshalJSON

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

UnmarshalJSON implements json.Unmarshaler

Jump to

Keyboard shortcuts

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