Documentation ¶
Index ¶
- Variables
- func RegisterDiscoveryServiceServer(s *grpc.Server, srv DiscoveryServiceServer)
- type BidirectionalStream
- func (*BidirectionalStream) Descriptor() ([]byte, []int)deprecated
- func (x *BidirectionalStream) GetRequest() *StreamRequest
- func (x *BidirectionalStream) GetResponse() *StreamResponse
- func (*BidirectionalStream) ProtoMessage()
- func (x *BidirectionalStream) ProtoReflect() protoreflect.Message
- func (x *BidirectionalStream) Reset()
- func (x *BidirectionalStream) String() string
- type DiscoveryServiceClient
- type DiscoveryServiceServer
- type DiscoveryService_EstablishStreamClient
- type DiscoveryService_EstablishStreamServer
- type StreamRequest
- func (*StreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StreamRequest) GetContext() string
- func (x *StreamRequest) GetResourceUrl() string
- func (x *StreamRequest) GetResponseNonce() string
- func (x *StreamRequest) GetStatus() *status.Status
- func (*StreamRequest) ProtoMessage()
- func (x *StreamRequest) ProtoReflect() protoreflect.Message
- func (x *StreamRequest) Reset()
- func (x *StreamRequest) String() string
- type StreamResponse
- func (*StreamResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StreamResponse) GetContext() string
- func (x *StreamResponse) GetNonce() string
- func (x *StreamResponse) GetOperation() StreamResponse_Operation
- func (x *StreamResponse) GetResource() *anypb.Any
- func (x *StreamResponse) GetResourceId() string
- func (x *StreamResponse) GetResourceUrl() string
- func (*StreamResponse) ProtoMessage()
- func (x *StreamResponse) ProtoReflect() protoreflect.Message
- func (x *StreamResponse) Reset()
- func (x *StreamResponse) String() string
- type StreamResponse_Operation
- func (StreamResponse_Operation) Descriptor() protoreflect.EnumDescriptor
- func (x StreamResponse_Operation) Enum() *StreamResponse_Operation
- func (StreamResponse_Operation) EnumDescriptor() ([]byte, []int)deprecated
- func (x StreamResponse_Operation) Number() protoreflect.EnumNumber
- func (x StreamResponse_Operation) String() string
- func (StreamResponse_Operation) Type() protoreflect.EnumType
- type UnimplementedDiscoveryServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( StreamResponse_Operation_name = map[int32]string{ 0: "UNKNOWN", 1: "UPSERT", 2: "DELETE", } StreamResponse_Operation_value = map[string]int32{ "UNKNOWN": 0, "UPSERT": 1, "DELETE": 2, } )
Enum value maps for StreamResponse_Operation.
var File_resource_discovery_v1alpha2_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDiscoveryServiceServer ¶
func RegisterDiscoveryServiceServer(s *grpc.Server, srv DiscoveryServiceServer)
Types ¶
type BidirectionalStream ¶
type BidirectionalStream struct { Request *StreamRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` Response *StreamResponse `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"` // contains filtered or unexported fields }
func (*BidirectionalStream) Descriptor
deprecated
func (*BidirectionalStream) Descriptor() ([]byte, []int)
Deprecated: Use BidirectionalStream.ProtoReflect.Descriptor instead.
func (*BidirectionalStream) GetRequest ¶
func (x *BidirectionalStream) GetRequest() *StreamRequest
func (*BidirectionalStream) GetResponse ¶
func (x *BidirectionalStream) GetResponse() *StreamResponse
func (*BidirectionalStream) ProtoMessage ¶
func (*BidirectionalStream) ProtoMessage()
func (*BidirectionalStream) ProtoReflect ¶
func (x *BidirectionalStream) ProtoReflect() protoreflect.Message
func (*BidirectionalStream) Reset ¶
func (x *BidirectionalStream) Reset()
func (*BidirectionalStream) String ¶
func (x *BidirectionalStream) String() string
type DiscoveryServiceClient ¶
type DiscoveryServiceClient interface { // Establish a new stream with a federated service mesh owner. The federated // service mesh owner can then send StreamResponse messages, and the federated // service mesh consumer can ACK/NACK these via new StreamRequest messages. EstablishStream(ctx context.Context, opts ...grpc.CallOption) (DiscoveryService_EstablishStreamClient, error) }
DiscoveryServiceClient is the client API for DiscoveryService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDiscoveryServiceClient ¶
func NewDiscoveryServiceClient(cc grpc.ClientConnInterface) DiscoveryServiceClient
type DiscoveryServiceServer ¶
type DiscoveryServiceServer interface { // Establish a new stream with a federated service mesh owner. The federated // service mesh owner can then send StreamResponse messages, and the federated // service mesh consumer can ACK/NACK these via new StreamRequest messages. EstablishStream(DiscoveryService_EstablishStreamServer) error }
DiscoveryServiceServer is the server API for DiscoveryService service.
type DiscoveryService_EstablishStreamClient ¶
type DiscoveryService_EstablishStreamClient interface { Send(*BidirectionalStream) error Recv() (*BidirectionalStream, error) grpc.ClientStream }
type DiscoveryService_EstablishStreamServer ¶
type DiscoveryService_EstablishStreamServer interface { Send(*BidirectionalStream) error Recv() (*BidirectionalStream, error) grpc.ServerStream }
type StreamRequest ¶
type StreamRequest struct { // REQUIRED. The type URL of the resource being requested. // Example: "type.googleapis.com/federation.types.v1alpha2.FederatedService" ResourceUrl string `protobuf:"bytes,1,opt,name=resource_url,json=resourceUrl,proto3" json:"resource_url,omitempty"` // The nonce of a consumed StreamResponse to ACK/NACK. This field should be // omitted in the first StreamRequest sent by the federated service mesh // consumer. ResponseNonce string `protobuf:"bytes,2,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` // The message consumption status of the client. This field should be omitted // in the first StreamRequest sent by the federated service mesh consumer. If // the message is consumed successfully, the status code should be set to OK. // If there is a failure in consuming a message, an appropriate status code // must be set along with the error details in the status' message field. Status *status.Status `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` // context which will be used for coorelation between req/response // on first call the context will be set and will be returned with all responses. // on future response as ack the same context will be used. Context string `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"` // contains filtered or unexported fields }
StreamRequest represents a streaming request sent by a federated service mesh consumer to a federated service mesh owner.
Following are some of the valid field combinations for a StreamRequest.
- Initial request: resource_url != "" response_nonce == "" status == nil
- ACK, request: resource_url != "" response_nonce != "" status != nil code == OK message == ""
- NACK, request: resource_url != "" response_nonce != "" status != nil code != OK message != ""
func (*StreamRequest) Descriptor
deprecated
func (*StreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use StreamRequest.ProtoReflect.Descriptor instead.
func (*StreamRequest) GetContext ¶
func (x *StreamRequest) GetContext() string
func (*StreamRequest) GetResourceUrl ¶
func (x *StreamRequest) GetResourceUrl() string
func (*StreamRequest) GetResponseNonce ¶
func (x *StreamRequest) GetResponseNonce() string
func (*StreamRequest) GetStatus ¶
func (x *StreamRequest) GetStatus() *status.Status
func (*StreamRequest) ProtoMessage ¶
func (*StreamRequest) ProtoMessage()
func (*StreamRequest) ProtoReflect ¶
func (x *StreamRequest) ProtoReflect() protoreflect.Message
func (*StreamRequest) Reset ¶
func (x *StreamRequest) Reset()
func (*StreamRequest) String ¶
func (x *StreamRequest) String() string
type StreamResponse ¶
type StreamResponse struct { // REQUIRED. The unique identifier for a StreamResponse. Nonce string `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` // REQUIRED. The type URL of the resource being returned in the response. // Example: "type.googleapis.com/federation.types.v1alpha2.FederatedService" ResourceUrl string `protobuf:"bytes,2,opt,name=resource_url,json=resourceUrl,proto3" json:"resource_url,omitempty"` // REQUIRED. The typed resource in relation to which an operation is to be // performed. ResourceId string `protobuf:"bytes,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // REQUIRED. The typed resource in relation to which an operation is to be // performed. Resource *anypb.Any `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"` // REQUIRED. The operation to be performed in relation to the resource. Operation StreamResponse_Operation `` /* 140-byte string literal not displayed */ // this is the context that was send in the initials request call Context string `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"` // contains filtered or unexported fields }
StreamResponse represents a streaming response sent by a federated service mesh owner to a federated service mesh consumer.
func (*StreamResponse) Descriptor
deprecated
func (*StreamResponse) Descriptor() ([]byte, []int)
Deprecated: Use StreamResponse.ProtoReflect.Descriptor instead.
func (*StreamResponse) GetContext ¶
func (x *StreamResponse) GetContext() string
func (*StreamResponse) GetNonce ¶
func (x *StreamResponse) GetNonce() string
func (*StreamResponse) GetOperation ¶
func (x *StreamResponse) GetOperation() StreamResponse_Operation
func (*StreamResponse) GetResource ¶
func (x *StreamResponse) GetResource() *anypb.Any
func (*StreamResponse) GetResourceId ¶
func (x *StreamResponse) GetResourceId() string
func (*StreamResponse) GetResourceUrl ¶
func (x *StreamResponse) GetResourceUrl() string
func (*StreamResponse) ProtoMessage ¶
func (*StreamResponse) ProtoMessage()
func (*StreamResponse) ProtoReflect ¶
func (x *StreamResponse) ProtoReflect() protoreflect.Message
func (*StreamResponse) Reset ¶
func (x *StreamResponse) Reset()
func (*StreamResponse) String ¶
func (x *StreamResponse) String() string
type StreamResponse_Operation ¶
type StreamResponse_Operation int32
Operation defines the set of possible operations that can be performed in relation to a resource.
const ( // Specifies an unknown operation. StreamResponse_UNKNOWN StreamResponse_Operation = 0 // Specifies a create operation. StreamResponse_UPSERT StreamResponse_Operation = 1 // Specifies a delete operation. StreamResponse_DELETE StreamResponse_Operation = 2 )
func (StreamResponse_Operation) Descriptor ¶
func (StreamResponse_Operation) Descriptor() protoreflect.EnumDescriptor
func (StreamResponse_Operation) Enum ¶
func (x StreamResponse_Operation) Enum() *StreamResponse_Operation
func (StreamResponse_Operation) EnumDescriptor
deprecated
func (StreamResponse_Operation) EnumDescriptor() ([]byte, []int)
Deprecated: Use StreamResponse_Operation.Descriptor instead.
func (StreamResponse_Operation) Number ¶
func (x StreamResponse_Operation) Number() protoreflect.EnumNumber
func (StreamResponse_Operation) String ¶
func (x StreamResponse_Operation) String() string
func (StreamResponse_Operation) Type ¶
func (StreamResponse_Operation) Type() protoreflect.EnumType
type UnimplementedDiscoveryServiceServer ¶
type UnimplementedDiscoveryServiceServer struct { }
UnimplementedDiscoveryServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedDiscoveryServiceServer) EstablishStream ¶
func (*UnimplementedDiscoveryServiceServer) EstablishStream(DiscoveryService_EstablishStreamServer) error