v1alpha1

package
v0.0.0-...-4e1f4d9 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StreamResponse_Operation_name = map[int32]string{
		0: "UNKNOWN",
		1: "CREATE",
		2: "UPDATE",
		3: "DELETE",
	}
	StreamResponse_Operation_value = map[string]int32{
		"UNKNOWN": 0,
		"CREATE":  1,
		"UPDATE":  2,
		"DELETE":  3,
	}
)

Enum value maps for StreamResponse_Operation.

View Source
var File_resource_discovery_v1alpha1_proto protoreflect.FileDescriptor

Functions

func RegisterDiscoveryServiceServer

func RegisterDiscoveryServiceServer(s *grpc.Server, srv DiscoveryServiceServer)

Types

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.

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(*StreamRequest) error
	Recv() (*StreamResponse, error)
	grpc.ClientStream
}

type DiscoveryService_EstablishStreamServer

type DiscoveryService_EstablishStreamServer interface {
	Send(*StreamResponse) error
	Recv() (*StreamRequest, error)
	grpc.ServerStream
}

type StreamRequest

type StreamRequest struct {

	// REQUIRED. The type URL of the resource being requested.
	// Example: "type.googleapis.com/federation.types.v1alpha1.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"`
	// 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) 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.v1alpha1.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.
	Resource *anypb.Any `protobuf:"bytes,3,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 */
	// 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) 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) 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_CREATE StreamResponse_Operation = 1
	// Specifies an update operation.
	StreamResponse_UPDATE StreamResponse_Operation = 2
	// Specifies a delete operation.
	StreamResponse_DELETE StreamResponse_Operation = 3
)

func (StreamResponse_Operation) Descriptor

func (StreamResponse_Operation) Enum

func (StreamResponse_Operation) EnumDescriptor deprecated

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

Deprecated: Use StreamResponse_Operation.Descriptor instead.

func (StreamResponse_Operation) Number

func (StreamResponse_Operation) String

func (x StreamResponse_Operation) String() string

func (StreamResponse_Operation) Type

type UnimplementedDiscoveryServiceServer

type UnimplementedDiscoveryServiceServer struct {
}

UnimplementedDiscoveryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedDiscoveryServiceServer) EstablishStream

Jump to

Keyboard shortcuts

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