Documentation ¶
Overview ¶
Code generated by protoc-gen-go. DO NOT EDIT. versions:
protoc-gen-go v1.31.0 protoc v4.23.2
source: google/cloud/agentcommunication/v1/agent_communication.proto
Index ¶
- Variables
- func RegisterAgentCommunicationServer(s *grpc.Server, srv AgentCommunicationServer)
- type AgentCommunicationClient
- type AgentCommunicationServer
- type AgentCommunication_StreamAgentMessagesClient
- type AgentCommunication_StreamAgentMessagesServer
- type ErrorReason
- func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x ErrorReason) Enum() *ErrorReason
- func (ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x ErrorReason) Number() protoreflect.EnumNumber
- func (x ErrorReason) String() string
- func (ErrorReason) Type() protoreflect.EnumType
- type MessageBody
- func (*MessageBody) Descriptor() ([]byte, []int)deprecated
- func (x *MessageBody) GetBody() *anypb.Any
- func (x *MessageBody) GetLabels() map[string]string
- func (*MessageBody) ProtoMessage()
- func (x *MessageBody) ProtoReflect() protoreflect.Message
- func (x *MessageBody) Reset()
- func (x *MessageBody) String() string
- type MessageResponse
- type RegisterConnection
- func (*RegisterConnection) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterConnection) GetChannelId() string
- func (x *RegisterConnection) GetProtocolVersion() int32
- func (x *RegisterConnection) GetResourceId() string
- func (*RegisterConnection) ProtoMessage()
- func (x *RegisterConnection) ProtoReflect() protoreflect.Message
- func (x *RegisterConnection) Reset()
- func (x *RegisterConnection) String() string
- type StreamAgentMessagesRequest
- func (*StreamAgentMessagesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamAgentMessagesRequest) GetMessageBody() *MessageBody
- func (x *StreamAgentMessagesRequest) GetMessageId() string
- func (x *StreamAgentMessagesRequest) GetMessageResponse() *MessageResponse
- func (x *StreamAgentMessagesRequest) GetRegisterConnection() *RegisterConnection
- func (m *StreamAgentMessagesRequest) GetType() isStreamAgentMessagesRequest_Type
- func (*StreamAgentMessagesRequest) ProtoMessage()
- func (x *StreamAgentMessagesRequest) ProtoReflect() protoreflect.Message
- func (x *StreamAgentMessagesRequest) Reset()
- func (x *StreamAgentMessagesRequest) String() string
- type StreamAgentMessagesRequest_MessageBody
- type StreamAgentMessagesRequest_MessageResponse
- type StreamAgentMessagesRequest_RegisterConnection
- type StreamAgentMessagesResponse
- func (*StreamAgentMessagesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamAgentMessagesResponse) GetMessageBody() *MessageBody
- func (x *StreamAgentMessagesResponse) GetMessageId() string
- func (x *StreamAgentMessagesResponse) GetMessageResponse() *MessageResponse
- func (m *StreamAgentMessagesResponse) GetType() isStreamAgentMessagesResponse_Type
- func (*StreamAgentMessagesResponse) ProtoMessage()
- func (x *StreamAgentMessagesResponse) ProtoReflect() protoreflect.Message
- func (x *StreamAgentMessagesResponse) Reset()
- func (x *StreamAgentMessagesResponse) String() string
- type StreamAgentMessagesResponse_ErrorReason
- func (StreamAgentMessagesResponse_ErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x StreamAgentMessagesResponse_ErrorReason) Enum() *StreamAgentMessagesResponse_ErrorReason
- func (StreamAgentMessagesResponse_ErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x StreamAgentMessagesResponse_ErrorReason) Number() protoreflect.EnumNumber
- func (x StreamAgentMessagesResponse_ErrorReason) String() string
- func (StreamAgentMessagesResponse_ErrorReason) Type() protoreflect.EnumType
- type StreamAgentMessagesResponse_MessageBody
- type StreamAgentMessagesResponse_MessageResponse
- type UnimplementedAgentCommunicationServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrorReason_name = map[int32]string{ 0: "ERROR_REASON_UNSPECIFIED", 1: "MISSING_MESSAGE_ID", 2: "INVALID_MESSAGE_TYPE", 3: "MESSAGE_NOT_ACKED", 4: "INVALID_MESSAGE_RESPONSE", 5: "INVALID_REGISTER_REQUEST", 6: "INVALID_STREAM_HEADERS", 7: "SERVICE_CHECK_FAILURE", 8: "AGENT_CONNECTION_RATE_QUOTA_EXCEEDED", 9: "AGENT_MESSAGE_RATE_QUOTA_EXCEEDED", 10: "AGENT_BANDWIDTH_RATE_QUOTA_EXCEEDED", } ErrorReason_value = map[string]int32{ "ERROR_REASON_UNSPECIFIED": 0, "MISSING_MESSAGE_ID": 1, "INVALID_MESSAGE_TYPE": 2, "MESSAGE_NOT_ACKED": 3, "INVALID_MESSAGE_RESPONSE": 4, "INVALID_REGISTER_REQUEST": 5, "INVALID_STREAM_HEADERS": 6, "SERVICE_CHECK_FAILURE": 7, "AGENT_CONNECTION_RATE_QUOTA_EXCEEDED": 8, "AGENT_MESSAGE_RATE_QUOTA_EXCEEDED": 9, "AGENT_BANDWIDTH_RATE_QUOTA_EXCEEDED": 10, } )
Enum value maps for ErrorReason.
var ( StreamAgentMessagesResponse_ErrorReason_name = map[int32]string{ 0: "ERROR_REASON_UNSPECIFIED", 1: "AGENT_MESSAGE_RATE_QUOTA_EXCEEDED", 2: "AGENT_BANDWIDTH_RATE_QUOTA_EXCEEDED", } StreamAgentMessagesResponse_ErrorReason_value = map[string]int32{ "ERROR_REASON_UNSPECIFIED": 0, "AGENT_MESSAGE_RATE_QUOTA_EXCEEDED": 1, "AGENT_BANDWIDTH_RATE_QUOTA_EXCEEDED": 2, } )
Enum value maps for StreamAgentMessagesResponse_ErrorReason.
var File_google_cloud_agentcommunication_v1_agent_communication_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAgentCommunicationServer ¶
func RegisterAgentCommunicationServer(s *grpc.Server, srv AgentCommunicationServer)
Types ¶
type AgentCommunicationClient ¶
type AgentCommunicationClient interface { // Bi-di streaming between the server and resource on a communication channel. StreamAgentMessages(ctx context.Context, opts ...grpc.CallOption) (AgentCommunication_StreamAgentMessagesClient, error) }
AgentCommunicationClient is the client API for AgentCommunication service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAgentCommunicationClient ¶
func NewAgentCommunicationClient(cc grpc.ClientConnInterface) AgentCommunicationClient
type AgentCommunicationServer ¶
type AgentCommunicationServer interface { // Bi-di streaming between the server and resource on a communication channel. StreamAgentMessages(AgentCommunication_StreamAgentMessagesServer) error }
AgentCommunicationServer is the server API for AgentCommunication service.
type AgentCommunication_StreamAgentMessagesClient ¶
type AgentCommunication_StreamAgentMessagesClient interface { Send(*StreamAgentMessagesRequest) error Recv() (*StreamAgentMessagesResponse, error) grpc.ClientStream }
type AgentCommunication_StreamAgentMessagesServer ¶
type AgentCommunication_StreamAgentMessagesServer interface { Send(*StreamAgentMessagesResponse) error Recv() (*StreamAgentMessagesRequest, error) grpc.ServerStream }
type ErrorReason ¶
type ErrorReason int32
Reasons returned in ErrorInfo with any messages containing google.rpc.Status.
const ( // Default value. This value is unused. ErrorReason_ERROR_REASON_UNSPECIFIED ErrorReason = 0 // The message was missing a message ID. ErrorReason_MISSING_MESSAGE_ID ErrorReason = 1 // The message type was missing or invalid. ErrorReason_INVALID_MESSAGE_TYPE ErrorReason = 2 // The was not acked. ErrorReason_MESSAGE_NOT_ACKED ErrorReason = 3 // The MessageResponse is invalid. ErrorReason_INVALID_MESSAGE_RESPONSE ErrorReason = 4 // The register request was invalid. ErrorReason_INVALID_REGISTER_REQUEST ErrorReason = 5 // Stream headers are missing or invalid. ErrorReason_INVALID_STREAM_HEADERS ErrorReason = 6 // Service enablement check failed. ErrorReason_SERVICE_CHECK_FAILURE ErrorReason = 7 // Rate of new connections is too high. ErrorReason_AGENT_CONNECTION_RATE_QUOTA_EXCEEDED ErrorReason = 8 // Rate of messages too high. This will only happen if message rate far // exceeds quota, well behaved agents are expected to respond to // AGENT_MESSAGE_RATE_QUOTA_EXCEEDED in StreamAgentMessagesResponse. ErrorReason_AGENT_MESSAGE_RATE_QUOTA_EXCEEDED ErrorReason = 9 // Message bandwidth of new connections is too high. ErrorReason_AGENT_BANDWIDTH_RATE_QUOTA_EXCEEDED ErrorReason = 10 )
func (ErrorReason) Descriptor ¶
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (ErrorReason) Enum ¶
func (x ErrorReason) Enum() *ErrorReason
func (ErrorReason) EnumDescriptor
deprecated
func (ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) Number ¶
func (x ErrorReason) Number() protoreflect.EnumNumber
func (ErrorReason) String ¶
func (x ErrorReason) String() string
func (ErrorReason) Type ¶
func (ErrorReason) Type() protoreflect.EnumType
type MessageBody ¶
type MessageBody struct { // Labels to use for this message for easy lookup and client side filtering. // Labels must meet the following constraints: // // * Keys and values can contain only lowercase letters, numeric characters, // underscores, and dashes. // * All characters must use UTF-8 encoding, and international characters are // allowed. // * Keys must start with a lowercase letter or international character. // * Each message is limited to a maximum of 12 labels and less than 1024 // bytes. Labels map[string]string `` /* 153-byte string literal not displayed */ // Required. The actual message. Body *anypb.Any `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
The message to be delivered.
func (*MessageBody) Descriptor
deprecated
func (*MessageBody) Descriptor() ([]byte, []int)
Deprecated: Use MessageBody.ProtoReflect.Descriptor instead.
func (*MessageBody) GetBody ¶
func (x *MessageBody) GetBody() *anypb.Any
func (*MessageBody) GetLabels ¶
func (x *MessageBody) GetLabels() map[string]string
func (*MessageBody) ProtoMessage ¶
func (*MessageBody) ProtoMessage()
func (*MessageBody) ProtoReflect ¶
func (x *MessageBody) ProtoReflect() protoreflect.Message
func (*MessageBody) Reset ¶
func (x *MessageBody) Reset()
func (*MessageBody) String ¶
func (x *MessageBody) String() string
type MessageResponse ¶
type MessageResponse struct { // Status for this message response, for non OK status ErrorInfo.reason will // be one of StreamAgentMessagesResponse.ErrorReason. // Expected agent responses: // OK - message was successfully received. // Expected service responses: // OK - message was successfully received. // RESOURCE_EXHAUSTED - this connection is rate limited, message delivery // should be slowed. Status *status.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
Response to a sent message.
func (*MessageResponse) Descriptor
deprecated
func (*MessageResponse) Descriptor() ([]byte, []int)
Deprecated: Use MessageResponse.ProtoReflect.Descriptor instead.
func (*MessageResponse) GetStatus ¶
func (x *MessageResponse) GetStatus() *status.Status
func (*MessageResponse) ProtoMessage ¶
func (*MessageResponse) ProtoMessage()
func (*MessageResponse) ProtoReflect ¶
func (x *MessageResponse) ProtoReflect() protoreflect.Message
func (*MessageResponse) Reset ¶
func (x *MessageResponse) Reset()
func (*MessageResponse) String ¶
func (x *MessageResponse) String() string
type RegisterConnection ¶
type RegisterConnection struct { // Required. Protocol version to use. ProtocolVersion int32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` // Required. ID of the channel for the connection. // The channel ID must: // - Be 1-63 characters in length. // - Match the regular expression ^[a-z]([-a-z0-9]*[a-z0-9])?$. This means // that the first character must be a lowercase letter, and all the following // characters must be hyphens, lowercase letters, or digits, except the last // character, which cannot be a hyphen. ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // Required. ID of the resource for the connection. // This must only contain UTF-8 encoded characters and be 1-255 characters in // length. ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // contains filtered or unexported fields }
Registers this connection.
func (*RegisterConnection) Descriptor
deprecated
func (*RegisterConnection) Descriptor() ([]byte, []int)
Deprecated: Use RegisterConnection.ProtoReflect.Descriptor instead.
func (*RegisterConnection) GetChannelId ¶
func (x *RegisterConnection) GetChannelId() string
func (*RegisterConnection) GetProtocolVersion ¶
func (x *RegisterConnection) GetProtocolVersion() int32
func (*RegisterConnection) GetResourceId ¶
func (x *RegisterConnection) GetResourceId() string
func (*RegisterConnection) ProtoMessage ¶
func (*RegisterConnection) ProtoMessage()
func (*RegisterConnection) ProtoReflect ¶
func (x *RegisterConnection) ProtoReflect() protoreflect.Message
func (*RegisterConnection) Reset ¶
func (x *RegisterConnection) Reset()
func (*RegisterConnection) String ¶
func (x *RegisterConnection) String() string
type StreamAgentMessagesRequest ¶
type StreamAgentMessagesRequest struct { // Required. The ID of the message sent to the service, this ID is used to // uniquely identify this message so service can ack. MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // Types that are assignable to Type: // *StreamAgentMessagesRequest_RegisterConnection // *StreamAgentMessagesRequest_MessageResponse // *StreamAgentMessagesRequest_MessageBody Type isStreamAgentMessagesRequest_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
A streaming request message to send messages to the server on a particular channel.
func (*StreamAgentMessagesRequest) Descriptor
deprecated
func (*StreamAgentMessagesRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamAgentMessagesRequest.ProtoReflect.Descriptor instead.
func (*StreamAgentMessagesRequest) GetMessageBody ¶
func (x *StreamAgentMessagesRequest) GetMessageBody() *MessageBody
func (*StreamAgentMessagesRequest) GetMessageId ¶
func (x *StreamAgentMessagesRequest) GetMessageId() string
func (*StreamAgentMessagesRequest) GetMessageResponse ¶
func (x *StreamAgentMessagesRequest) GetMessageResponse() *MessageResponse
func (*StreamAgentMessagesRequest) GetRegisterConnection ¶
func (x *StreamAgentMessagesRequest) GetRegisterConnection() *RegisterConnection
func (*StreamAgentMessagesRequest) GetType ¶
func (m *StreamAgentMessagesRequest) GetType() isStreamAgentMessagesRequest_Type
func (*StreamAgentMessagesRequest) ProtoMessage ¶
func (*StreamAgentMessagesRequest) ProtoMessage()
func (*StreamAgentMessagesRequest) ProtoReflect ¶
func (x *StreamAgentMessagesRequest) ProtoReflect() protoreflect.Message
func (*StreamAgentMessagesRequest) Reset ¶
func (x *StreamAgentMessagesRequest) Reset()
func (*StreamAgentMessagesRequest) String ¶
func (x *StreamAgentMessagesRequest) String() string
type StreamAgentMessagesRequest_MessageBody ¶
type StreamAgentMessagesRequest_MessageBody struct { // A message meant for a client. MessageBody *MessageBody `protobuf:"bytes,4,opt,name=message_body,json=messageBody,proto3,oneof"` }
type StreamAgentMessagesRequest_MessageResponse ¶
type StreamAgentMessagesRequest_MessageResponse struct { // Response to a message sent from the service. // Should be sent as soon as the agent receives a message. MessageResponse *MessageResponse `protobuf:"bytes,3,opt,name=message_response,json=messageResponse,proto3,oneof"` }
type StreamAgentMessagesRequest_RegisterConnection ¶
type StreamAgentMessagesRequest_RegisterConnection struct { // Initial stream message. Must be sent before any other messages on this // stream. RegisterConnection *RegisterConnection `protobuf:"bytes,2,opt,name=register_connection,json=registerConnection,proto3,oneof"` }
type StreamAgentMessagesResponse ¶
type StreamAgentMessagesResponse struct { // The ID of the message sent to the agent, this ID is used to uniquely // identify this message so agent can ack. MessageId string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` // Types that are assignable to Type: // *StreamAgentMessagesResponse_MessageResponse // *StreamAgentMessagesResponse_MessageBody Type isStreamAgentMessagesResponse_Type `protobuf_oneof:"type"` // contains filtered or unexported fields }
The streaming rpc message that will send messages to the agent.
func (*StreamAgentMessagesResponse) Descriptor
deprecated
func (*StreamAgentMessagesResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamAgentMessagesResponse.ProtoReflect.Descriptor instead.
func (*StreamAgentMessagesResponse) GetMessageBody ¶
func (x *StreamAgentMessagesResponse) GetMessageBody() *MessageBody
func (*StreamAgentMessagesResponse) GetMessageId ¶
func (x *StreamAgentMessagesResponse) GetMessageId() string
func (*StreamAgentMessagesResponse) GetMessageResponse ¶
func (x *StreamAgentMessagesResponse) GetMessageResponse() *MessageResponse
func (*StreamAgentMessagesResponse) GetType ¶
func (m *StreamAgentMessagesResponse) GetType() isStreamAgentMessagesResponse_Type
func (*StreamAgentMessagesResponse) ProtoMessage ¶
func (*StreamAgentMessagesResponse) ProtoMessage()
func (*StreamAgentMessagesResponse) ProtoReflect ¶
func (x *StreamAgentMessagesResponse) ProtoReflect() protoreflect.Message
func (*StreamAgentMessagesResponse) Reset ¶
func (x *StreamAgentMessagesResponse) Reset()
func (*StreamAgentMessagesResponse) String ¶
func (x *StreamAgentMessagesResponse) String() string
type StreamAgentMessagesResponse_ErrorReason ¶
type StreamAgentMessagesResponse_ErrorReason int32
Reasons returned in ErrorInfo when the status field of MessageResponse is not OK.
const ( // Default value. This value is unused. StreamAgentMessagesResponse_ERROR_REASON_UNSPECIFIED StreamAgentMessagesResponse_ErrorReason = 0 // Message rate is too high. StreamAgentMessagesResponse_AGENT_MESSAGE_RATE_QUOTA_EXCEEDED StreamAgentMessagesResponse_ErrorReason = 1 // Message Bandwidth rate is too high. StreamAgentMessagesResponse_AGENT_BANDWIDTH_RATE_QUOTA_EXCEEDED StreamAgentMessagesResponse_ErrorReason = 2 )
func (StreamAgentMessagesResponse_ErrorReason) Descriptor ¶
func (StreamAgentMessagesResponse_ErrorReason) Descriptor() protoreflect.EnumDescriptor
func (StreamAgentMessagesResponse_ErrorReason) EnumDescriptor
deprecated
func (StreamAgentMessagesResponse_ErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use StreamAgentMessagesResponse_ErrorReason.Descriptor instead.
func (StreamAgentMessagesResponse_ErrorReason) Number ¶
func (x StreamAgentMessagesResponse_ErrorReason) Number() protoreflect.EnumNumber
func (StreamAgentMessagesResponse_ErrorReason) String ¶
func (x StreamAgentMessagesResponse_ErrorReason) String() string
func (StreamAgentMessagesResponse_ErrorReason) Type ¶
func (StreamAgentMessagesResponse_ErrorReason) Type() protoreflect.EnumType
type StreamAgentMessagesResponse_MessageBody ¶
type StreamAgentMessagesResponse_MessageBody struct { // A message sent from a client. MessageBody *MessageBody `protobuf:"bytes,3,opt,name=message_body,json=messageBody,proto3,oneof"` }
type StreamAgentMessagesResponse_MessageResponse ¶
type StreamAgentMessagesResponse_MessageResponse struct { // Response to a message sent to the service. // Will be sent as soon as the service receives a message. MessageResponse *MessageResponse `protobuf:"bytes,2,opt,name=message_response,json=messageResponse,proto3,oneof"` }
type UnimplementedAgentCommunicationServer ¶
type UnimplementedAgentCommunicationServer struct { }
UnimplementedAgentCommunicationServer can be embedded to have forward compatible implementations.
func (*UnimplementedAgentCommunicationServer) StreamAgentMessages ¶
func (*UnimplementedAgentCommunicationServer) StreamAgentMessages(AgentCommunication_StreamAgentMessagesServer) error