github.com/cilium/cilium@v1.16.2/api/v1/relay/relay.pb.go (about)

     1  // SPDX-License-Identifier: Apache-2.0
     2  // Copyright Authors of Cilium
     3  
     4  // Code generated by protoc-gen-go. DO NOT EDIT.
     5  // versions:
     6  // 	protoc-gen-go v1.34.2
     7  // 	protoc        v5.28.1
     8  // source: relay/relay.proto
     9  
    10  package relay
    11  
    12  import (
    13  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    14  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    15  	reflect "reflect"
    16  	sync "sync"
    17  )
    18  
    19  const (
    20  	// Verify that this generated code is sufficiently up-to-date.
    21  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    22  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    23  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    24  )
    25  
    26  type NodeState int32
    27  
    28  const (
    29  	// UNKNOWN_NODE_STATE indicates that the state of this node is unknown.
    30  	NodeState_UNKNOWN_NODE_STATE NodeState = 0
    31  	// NODE_CONNECTED indicates that we have established a connection
    32  	// to this node. The client can expect to observe flows from this node.
    33  	NodeState_NODE_CONNECTED NodeState = 1
    34  	// NODE_UNAVAILABLE indicates that the connection to this
    35  	// node is currently unavailable. The client can expect to not see any
    36  	// flows from this node until either the connection is re-established or
    37  	// the node is gone.
    38  	NodeState_NODE_UNAVAILABLE NodeState = 2
    39  	// NODE_GONE indicates that a node has been removed from the
    40  	// cluster. No reconnection attempts will be made.
    41  	NodeState_NODE_GONE NodeState = 3
    42  	// NODE_ERROR indicates that a node has reported an error while processing
    43  	// the request. No reconnection attempts will be made.
    44  	NodeState_NODE_ERROR NodeState = 4
    45  )
    46  
    47  // Enum value maps for NodeState.
    48  var (
    49  	NodeState_name = map[int32]string{
    50  		0: "UNKNOWN_NODE_STATE",
    51  		1: "NODE_CONNECTED",
    52  		2: "NODE_UNAVAILABLE",
    53  		3: "NODE_GONE",
    54  		4: "NODE_ERROR",
    55  	}
    56  	NodeState_value = map[string]int32{
    57  		"UNKNOWN_NODE_STATE": 0,
    58  		"NODE_CONNECTED":     1,
    59  		"NODE_UNAVAILABLE":   2,
    60  		"NODE_GONE":          3,
    61  		"NODE_ERROR":         4,
    62  	}
    63  )
    64  
    65  func (x NodeState) Enum() *NodeState {
    66  	p := new(NodeState)
    67  	*p = x
    68  	return p
    69  }
    70  
    71  func (x NodeState) String() string {
    72  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    73  }
    74  
    75  func (NodeState) Descriptor() protoreflect.EnumDescriptor {
    76  	return file_relay_relay_proto_enumTypes[0].Descriptor()
    77  }
    78  
    79  func (NodeState) Type() protoreflect.EnumType {
    80  	return &file_relay_relay_proto_enumTypes[0]
    81  }
    82  
    83  func (x NodeState) Number() protoreflect.EnumNumber {
    84  	return protoreflect.EnumNumber(x)
    85  }
    86  
    87  // Deprecated: Use NodeState.Descriptor instead.
    88  func (NodeState) EnumDescriptor() ([]byte, []int) {
    89  	return file_relay_relay_proto_rawDescGZIP(), []int{0}
    90  }
    91  
    92  // NodeStatusEvent is a message sent by hubble-relay to inform clients about
    93  // the state of a particular node.
    94  type NodeStatusEvent struct {
    95  	state         protoimpl.MessageState
    96  	sizeCache     protoimpl.SizeCache
    97  	unknownFields protoimpl.UnknownFields
    98  
    99  	// state_change contains the new node state
   100  	StateChange NodeState `protobuf:"varint,1,opt,name=state_change,json=stateChange,proto3,enum=relay.NodeState" json:"state_change,omitempty"`
   101  	// node_names is the list of nodes for which the above state changes applies
   102  	NodeNames []string `protobuf:"bytes,2,rep,name=node_names,json=nodeNames,proto3" json:"node_names,omitempty"`
   103  	// message is an optional message attached to the state change (e.g. an
   104  	// error message). The message applies to all nodes in node_names.
   105  	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
   106  }
   107  
   108  func (x *NodeStatusEvent) Reset() {
   109  	*x = NodeStatusEvent{}
   110  	if protoimpl.UnsafeEnabled {
   111  		mi := &file_relay_relay_proto_msgTypes[0]
   112  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   113  		ms.StoreMessageInfo(mi)
   114  	}
   115  }
   116  
   117  func (x *NodeStatusEvent) String() string {
   118  	return protoimpl.X.MessageStringOf(x)
   119  }
   120  
   121  func (*NodeStatusEvent) ProtoMessage() {}
   122  
   123  func (x *NodeStatusEvent) ProtoReflect() protoreflect.Message {
   124  	mi := &file_relay_relay_proto_msgTypes[0]
   125  	if protoimpl.UnsafeEnabled && x != nil {
   126  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   127  		if ms.LoadMessageInfo() == nil {
   128  			ms.StoreMessageInfo(mi)
   129  		}
   130  		return ms
   131  	}
   132  	return mi.MessageOf(x)
   133  }
   134  
   135  // Deprecated: Use NodeStatusEvent.ProtoReflect.Descriptor instead.
   136  func (*NodeStatusEvent) Descriptor() ([]byte, []int) {
   137  	return file_relay_relay_proto_rawDescGZIP(), []int{0}
   138  }
   139  
   140  func (x *NodeStatusEvent) GetStateChange() NodeState {
   141  	if x != nil {
   142  		return x.StateChange
   143  	}
   144  	return NodeState_UNKNOWN_NODE_STATE
   145  }
   146  
   147  func (x *NodeStatusEvent) GetNodeNames() []string {
   148  	if x != nil {
   149  		return x.NodeNames
   150  	}
   151  	return nil
   152  }
   153  
   154  func (x *NodeStatusEvent) GetMessage() string {
   155  	if x != nil {
   156  		return x.Message
   157  	}
   158  	return ""
   159  }
   160  
   161  var File_relay_relay_proto protoreflect.FileDescriptor
   162  
   163  var file_relay_relay_proto_rawDesc = []byte{
   164  	0x0a, 0x11, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x72,
   165  	0x6f, 0x74, 0x6f, 0x12, 0x05, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x22, 0x7f, 0x0a, 0x0f, 0x4e, 0x6f,
   166  	0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a,
   167  	0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20,
   168  	0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
   169  	0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e,
   170  	0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73,
   171  	0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65,
   172  	0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01,
   173  	0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2a, 0x6c, 0x0a, 0x09, 0x4e,
   174  	0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x4e, 0x4b, 0x4e,
   175  	0x4f, 0x57, 0x4e, 0x5f, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00,
   176  	0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54,
   177  	0x45, 0x44, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4e, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x41,
   178  	0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f,
   179  	0x44, 0x45, 0x5f, 0x47, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x4f, 0x44,
   180  	0x45, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x04, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74,
   181  	0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x63,
   182  	0x69, 0x6c, 0x69, 0x75, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, 0x6c,
   183  	0x61, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   184  }
   185  
   186  var (
   187  	file_relay_relay_proto_rawDescOnce sync.Once
   188  	file_relay_relay_proto_rawDescData = file_relay_relay_proto_rawDesc
   189  )
   190  
   191  func file_relay_relay_proto_rawDescGZIP() []byte {
   192  	file_relay_relay_proto_rawDescOnce.Do(func() {
   193  		file_relay_relay_proto_rawDescData = protoimpl.X.CompressGZIP(file_relay_relay_proto_rawDescData)
   194  	})
   195  	return file_relay_relay_proto_rawDescData
   196  }
   197  
   198  var file_relay_relay_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   199  var file_relay_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   200  var file_relay_relay_proto_goTypes = []any{
   201  	(NodeState)(0),          // 0: relay.NodeState
   202  	(*NodeStatusEvent)(nil), // 1: relay.NodeStatusEvent
   203  }
   204  var file_relay_relay_proto_depIdxs = []int32{
   205  	0, // 0: relay.NodeStatusEvent.state_change:type_name -> relay.NodeState
   206  	1, // [1:1] is the sub-list for method output_type
   207  	1, // [1:1] is the sub-list for method input_type
   208  	1, // [1:1] is the sub-list for extension type_name
   209  	1, // [1:1] is the sub-list for extension extendee
   210  	0, // [0:1] is the sub-list for field type_name
   211  }
   212  
   213  func init() { file_relay_relay_proto_init() }
   214  func file_relay_relay_proto_init() {
   215  	if File_relay_relay_proto != nil {
   216  		return
   217  	}
   218  	if !protoimpl.UnsafeEnabled {
   219  		file_relay_relay_proto_msgTypes[0].Exporter = func(v any, i int) any {
   220  			switch v := v.(*NodeStatusEvent); i {
   221  			case 0:
   222  				return &v.state
   223  			case 1:
   224  				return &v.sizeCache
   225  			case 2:
   226  				return &v.unknownFields
   227  			default:
   228  				return nil
   229  			}
   230  		}
   231  	}
   232  	type x struct{}
   233  	out := protoimpl.TypeBuilder{
   234  		File: protoimpl.DescBuilder{
   235  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   236  			RawDescriptor: file_relay_relay_proto_rawDesc,
   237  			NumEnums:      1,
   238  			NumMessages:   1,
   239  			NumExtensions: 0,
   240  			NumServices:   0,
   241  		},
   242  		GoTypes:           file_relay_relay_proto_goTypes,
   243  		DependencyIndexes: file_relay_relay_proto_depIdxs,
   244  		EnumInfos:         file_relay_relay_proto_enumTypes,
   245  		MessageInfos:      file_relay_relay_proto_msgTypes,
   246  	}.Build()
   247  	File_relay_relay_proto = out.File
   248  	file_relay_relay_proto_rawDesc = nil
   249  	file_relay_relay_proto_goTypes = nil
   250  	file_relay_relay_proto_depIdxs = nil
   251  }