Documentation ¶
Index ¶
- Variables
- func RegisterAggregatedMeshConfigServiceServer(s grpc.ServiceRegistrar, srv AggregatedMeshConfigServiceServer)
- func RegisterResourceSinkServer(s grpc.ServiceRegistrar, srv ResourceSinkServer)
- func RegisterResourceSourceServer(s grpc.ServiceRegistrar, srv ResourceSourceServer)
- type AggregatedMeshConfigServiceClient
- type AggregatedMeshConfigServiceServer
- type AggregatedMeshConfigService_IncrementalAggregatedResourcesClient
- type AggregatedMeshConfigService_IncrementalAggregatedResourcesServer
- type AggregatedMeshConfigService_StreamAggregatedResourcesClient
- type AggregatedMeshConfigService_StreamAggregatedResourcesServer
- type IncrementalMeshConfigRequest
- func (*IncrementalMeshConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *IncrementalMeshConfigRequest) GetErrorDetail() *status.Status
- func (x *IncrementalMeshConfigRequest) GetInitialResourceVersions() map[string]string
- func (x *IncrementalMeshConfigRequest) GetResponseNonce() string
- func (x *IncrementalMeshConfigRequest) GetSinkNode() *SinkNode
- func (x *IncrementalMeshConfigRequest) GetTypeUrl() string
- func (*IncrementalMeshConfigRequest) ProtoMessage()
- func (x *IncrementalMeshConfigRequest) ProtoReflect() protoreflect.Message
- func (x *IncrementalMeshConfigRequest) Reset()
- func (x *IncrementalMeshConfigRequest) String() string
- type IncrementalMeshConfigResponse
- func (*IncrementalMeshConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *IncrementalMeshConfigResponse) GetNonce() string
- func (x *IncrementalMeshConfigResponse) GetRemovedResources() []string
- func (x *IncrementalMeshConfigResponse) GetResources() []*Resource
- func (x *IncrementalMeshConfigResponse) GetSystemVersionInfo() string
- func (*IncrementalMeshConfigResponse) ProtoMessage()
- func (x *IncrementalMeshConfigResponse) ProtoReflect() protoreflect.Message
- func (x *IncrementalMeshConfigResponse) Reset()
- func (x *IncrementalMeshConfigResponse) String() string
- type MeshConfigRequest
- func (*MeshConfigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MeshConfigRequest) GetErrorDetail() *status.Status
- func (x *MeshConfigRequest) GetResponseNonce() string
- func (x *MeshConfigRequest) GetSinkNode() *SinkNode
- func (x *MeshConfigRequest) GetTypeUrl() string
- func (x *MeshConfigRequest) GetVersionInfo() string
- func (*MeshConfigRequest) ProtoMessage()
- func (x *MeshConfigRequest) ProtoReflect() protoreflect.Message
- func (x *MeshConfigRequest) Reset()
- func (x *MeshConfigRequest) String() string
- type MeshConfigResponse
- func (*MeshConfigResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MeshConfigResponse) GetNonce() string
- func (x *MeshConfigResponse) GetResources() []*Resource
- func (x *MeshConfigResponse) GetTypeUrl() string
- func (x *MeshConfigResponse) GetVersionInfo() string
- func (*MeshConfigResponse) ProtoMessage()
- func (x *MeshConfigResponse) ProtoReflect() protoreflect.Message
- func (x *MeshConfigResponse) Reset()
- func (x *MeshConfigResponse) String() string
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetAnnotations() map[string]string
- func (x *Metadata) GetCreateTime() *timestamp.Timestamp
- func (x *Metadata) GetLabels() map[string]string
- func (x *Metadata) GetName() string
- func (x *Metadata) GetVersion() string
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type RequestResources
- func (*RequestResources) Descriptor() ([]byte, []int)deprecated
- func (x *RequestResources) GetCollection() string
- func (x *RequestResources) GetErrorDetail() *status.Status
- func (x *RequestResources) GetIncremental() bool
- func (x *RequestResources) GetInitialResourceVersions() map[string]string
- func (x *RequestResources) GetResponseNonce() string
- func (x *RequestResources) GetSinkNode() *SinkNode
- func (*RequestResources) ProtoMessage()
- func (x *RequestResources) ProtoReflect() protoreflect.Message
- func (x *RequestResources) Reset()
- func (x *RequestResources) String() string
- type Resource
- type ResourceSinkClient
- type ResourceSinkServer
- type ResourceSink_EstablishResourceStreamClient
- type ResourceSink_EstablishResourceStreamServer
- type ResourceSourceClient
- type ResourceSourceServer
- type ResourceSource_EstablishResourceStreamClient
- type ResourceSource_EstablishResourceStreamServer
- type Resources
- func (*Resources) Descriptor() ([]byte, []int)deprecated
- func (x *Resources) GetCollection() string
- func (x *Resources) GetIncremental() bool
- func (x *Resources) GetNonce() string
- func (x *Resources) GetRemovedResources() []string
- func (x *Resources) GetResources() []*Resource
- func (x *Resources) GetSystemVersionInfo() string
- func (*Resources) ProtoMessage()
- func (x *Resources) ProtoReflect() protoreflect.Message
- func (x *Resources) Reset()
- func (x *Resources) String() string
- type SinkNode
- type UnimplementedAggregatedMeshConfigServiceServer
- func (UnimplementedAggregatedMeshConfigServiceServer) IncrementalAggregatedResources(AggregatedMeshConfigService_IncrementalAggregatedResourcesServer) error
- func (UnimplementedAggregatedMeshConfigServiceServer) StreamAggregatedResources(AggregatedMeshConfigService_StreamAggregatedResourcesServer) error
- type UnimplementedResourceSinkServer
- type UnimplementedResourceSourceServer
- type UnsafeAggregatedMeshConfigServiceServer
- type UnsafeResourceSinkServer
- type UnsafeResourceSourceServer
Constants ¶
This section is empty.
Variables ¶
var AggregatedMeshConfigService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "istio.mcp.v1alpha1.AggregatedMeshConfigService", HandlerType: (*AggregatedMeshConfigServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "StreamAggregatedResources", Handler: _AggregatedMeshConfigService_StreamAggregatedResources_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "IncrementalAggregatedResources", Handler: _AggregatedMeshConfigService_IncrementalAggregatedResources_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "mcp/v1alpha1/mcp.proto", }
AggregatedMeshConfigService_ServiceDesc is the grpc.ServiceDesc for AggregatedMeshConfigService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_mcp_v1alpha1_mcp_proto protoreflect.FileDescriptor
var File_mcp_v1alpha1_metadata_proto protoreflect.FileDescriptor
var File_mcp_v1alpha1_resource_proto protoreflect.FileDescriptor
var ResourceSink_ServiceDesc = grpc.ServiceDesc{ ServiceName: "istio.mcp.v1alpha1.ResourceSink", HandlerType: (*ResourceSinkServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "EstablishResourceStream", Handler: _ResourceSink_EstablishResourceStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "mcp/v1alpha1/mcp.proto", }
ResourceSink_ServiceDesc is the grpc.ServiceDesc for ResourceSink service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ResourceSource_ServiceDesc = grpc.ServiceDesc{ ServiceName: "istio.mcp.v1alpha1.ResourceSource", HandlerType: (*ResourceSourceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "EstablishResourceStream", Handler: _ResourceSource_EstablishResourceStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "mcp/v1alpha1/mcp.proto", }
ResourceSource_ServiceDesc is the grpc.ServiceDesc for ResourceSource service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAggregatedMeshConfigServiceServer ¶
func RegisterAggregatedMeshConfigServiceServer(s grpc.ServiceRegistrar, srv AggregatedMeshConfigServiceServer)
func RegisterResourceSinkServer ¶
func RegisterResourceSinkServer(s grpc.ServiceRegistrar, srv ResourceSinkServer)
func RegisterResourceSourceServer ¶
func RegisterResourceSourceServer(s grpc.ServiceRegistrar, srv ResourceSourceServer)
Types ¶
type AggregatedMeshConfigServiceClient ¶
type AggregatedMeshConfigServiceClient interface { // StreamAggregatedResources provides the ability to carefully // sequence updates across multiple resource types. A single stream // is used with multiple independent MeshConfigRequest / // MeshConfigResponses sequences multiplexed via the type URL. StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedMeshConfigService_StreamAggregatedResourcesClient, error) // IncrementalAggregatedResources provides the ability to incrementally // update the resources on the client. This supports the goal of // scalability of MCP resources. IncrementalAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedMeshConfigService_IncrementalAggregatedResourcesClient, error) }
AggregatedMeshConfigServiceClient is the client API for AggregatedMeshConfigService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAggregatedMeshConfigServiceClient ¶
func NewAggregatedMeshConfigServiceClient(cc grpc.ClientConnInterface) AggregatedMeshConfigServiceClient
type AggregatedMeshConfigServiceServer ¶
type AggregatedMeshConfigServiceServer interface { // StreamAggregatedResources provides the ability to carefully // sequence updates across multiple resource types. A single stream // is used with multiple independent MeshConfigRequest / // MeshConfigResponses sequences multiplexed via the type URL. StreamAggregatedResources(AggregatedMeshConfigService_StreamAggregatedResourcesServer) error // IncrementalAggregatedResources provides the ability to incrementally // update the resources on the client. This supports the goal of // scalability of MCP resources. IncrementalAggregatedResources(AggregatedMeshConfigService_IncrementalAggregatedResourcesServer) error // contains filtered or unexported methods }
AggregatedMeshConfigServiceServer is the server API for AggregatedMeshConfigService service. All implementations must embed UnimplementedAggregatedMeshConfigServiceServer for forward compatibility
type AggregatedMeshConfigService_IncrementalAggregatedResourcesClient ¶
type AggregatedMeshConfigService_IncrementalAggregatedResourcesClient interface { Send(*IncrementalMeshConfigRequest) error Recv() (*IncrementalMeshConfigResponse, error) grpc.ClientStream }
type AggregatedMeshConfigService_IncrementalAggregatedResourcesServer ¶
type AggregatedMeshConfigService_IncrementalAggregatedResourcesServer interface { Send(*IncrementalMeshConfigResponse) error Recv() (*IncrementalMeshConfigRequest, error) grpc.ServerStream }
type AggregatedMeshConfigService_StreamAggregatedResourcesClient ¶
type AggregatedMeshConfigService_StreamAggregatedResourcesClient interface { Send(*MeshConfigRequest) error Recv() (*MeshConfigResponse, error) grpc.ClientStream }
type AggregatedMeshConfigService_StreamAggregatedResourcesServer ¶
type AggregatedMeshConfigService_StreamAggregatedResourcesServer interface { Send(*MeshConfigResponse) error Recv() (*MeshConfigRequest, error) grpc.ServerStream }
type IncrementalMeshConfigRequest ¶
type IncrementalMeshConfigRequest struct { // The sink node making the request. SinkNode *SinkNode `protobuf:"bytes,1,opt,name=sink_node,json=sinkNode,proto3" json:"sink_node,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // When the IncrementalMeshConfigRequest is the first in a stream, // the initial_resource_versions must be populated. Otherwise, // initial_resource_versions must be omitted. The keys are the // resources names of the MCP resources known to the MCP client. The // values in the map are the associated resource level version info. InitialResourceVersions map[string]string `` /* 220-byte string literal not displayed */ // When the IncrementalMeshConfigRequest is a ACK or NACK message in response // to a previous IncrementalMeshConfigResponse, the response_nonce must be the // nonce in the IncrementalMeshConfigResponse. // Otherwise response_nonce must be omitted. ResponseNonce string `protobuf:"bytes,4,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` // This is populated when the previous IncrementalMeshConfigResponses // failed to update configuration. The *message* field in *error_details* // provides the client internal exception related to the failure. ErrorDetail *status.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` // contains filtered or unexported fields }
IncrementalMeshConfigRequest are be sent in 2 situations:
Initial message in a MCP bidirectional gRPC stream.
As a ACK or NACK response to a previous IncrementalMeshConfigResponse. In this case the response_nonce is set to the nonce value in the Response. ACK or NACK is determined by the absence or presence of error_detail.
func (*IncrementalMeshConfigRequest) Descriptor
deprecated
func (*IncrementalMeshConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use IncrementalMeshConfigRequest.ProtoReflect.Descriptor instead.
func (*IncrementalMeshConfigRequest) GetErrorDetail ¶
func (x *IncrementalMeshConfigRequest) GetErrorDetail() *status.Status
func (*IncrementalMeshConfigRequest) GetInitialResourceVersions ¶
func (x *IncrementalMeshConfigRequest) GetInitialResourceVersions() map[string]string
func (*IncrementalMeshConfigRequest) GetResponseNonce ¶
func (x *IncrementalMeshConfigRequest) GetResponseNonce() string
func (*IncrementalMeshConfigRequest) GetSinkNode ¶
func (x *IncrementalMeshConfigRequest) GetSinkNode() *SinkNode
func (*IncrementalMeshConfigRequest) GetTypeUrl ¶
func (x *IncrementalMeshConfigRequest) GetTypeUrl() string
func (*IncrementalMeshConfigRequest) ProtoMessage ¶
func (*IncrementalMeshConfigRequest) ProtoMessage()
func (*IncrementalMeshConfigRequest) ProtoReflect ¶
func (x *IncrementalMeshConfigRequest) ProtoReflect() protoreflect.Message
func (*IncrementalMeshConfigRequest) Reset ¶
func (x *IncrementalMeshConfigRequest) Reset()
func (*IncrementalMeshConfigRequest) String ¶
func (x *IncrementalMeshConfigRequest) String() string
type IncrementalMeshConfigResponse ¶
type IncrementalMeshConfigResponse struct { // The version of the response data (used for debugging). SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` // The response resources wrapped in the common MCP *Resource* // message. These are typed resources that match the type url in the // IncrementalMeshConfigRequest. Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` // Resources names of resources that have be deleted and to be // removed from the MCP Client. Removed resources for missing // resources can be ignored. RemovedResources []string `protobuf:"bytes,3,rep,name=removed_resources,json=removedResources,proto3" json:"removed_resources,omitempty"` // The nonce provides a way for IncrementalMeshConfigRequests to // uniquely reference an IncrementalMeshConfigResponse. The nonce is // required. Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` // contains filtered or unexported fields }
IncrementalMeshConfigResponses do not need to include a full snapshot of the tracked resources. Instead they are a diff to the state of a MCP client. Per resource versions allow servers and clients to track state at the resource granularity. An MCP incremental session is always in the context of a gRPC bidirectional stream. This allows the MCP server to keep track of the state of MCP clients connected to it.
In Incremental MCP the nonce field is required and used to pair IncrementalMeshConfigResponse to an IncrementalMeshConfigRequest ACK or NACK. Optionally, a response message level system_version_info is present for debugging purposes only.
func (*IncrementalMeshConfigResponse) Descriptor
deprecated
func (*IncrementalMeshConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use IncrementalMeshConfigResponse.ProtoReflect.Descriptor instead.
func (*IncrementalMeshConfigResponse) GetNonce ¶
func (x *IncrementalMeshConfigResponse) GetNonce() string
func (*IncrementalMeshConfigResponse) GetRemovedResources ¶
func (x *IncrementalMeshConfigResponse) GetRemovedResources() []string
func (*IncrementalMeshConfigResponse) GetResources ¶
func (x *IncrementalMeshConfigResponse) GetResources() []*Resource
func (*IncrementalMeshConfigResponse) GetSystemVersionInfo ¶
func (x *IncrementalMeshConfigResponse) GetSystemVersionInfo() string
func (*IncrementalMeshConfigResponse) ProtoMessage ¶
func (*IncrementalMeshConfigResponse) ProtoMessage()
func (*IncrementalMeshConfigResponse) ProtoReflect ¶
func (x *IncrementalMeshConfigResponse) ProtoReflect() protoreflect.Message
func (*IncrementalMeshConfigResponse) Reset ¶
func (x *IncrementalMeshConfigResponse) Reset()
func (*IncrementalMeshConfigResponse) String ¶
func (x *IncrementalMeshConfigResponse) String() string
type MeshConfigRequest ¶
type MeshConfigRequest struct { // The version_info provided in the request messages will be the // version_info received with the most recent successfully processed // response or empty on the first request. It is expected that no // new request is sent after a response is received until the client // instance is ready to ACK/NACK the new configuration. ACK/NACK // takes place by returning the new API config version as applied or // the previous API config version respectively. Each type_url (see // below) has an independent version associated with it. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // The sink node making the request. SinkNode *SinkNode `protobuf:"bytes,2,opt,name=sink_node,json=sinkNode,proto3" json:"sink_node,omitempty"` // Type of the resource that is being requested, e.g. // "type.googleapis.com/istio.io.networking.v1alpha3.VirtualService". TypeUrl string `protobuf:"bytes,3,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // The nonce corresponding to MeshConfigResponse being // ACK/NACKed. See above discussion on version_info and the // MeshConfigResponse nonce comment. This may be empty if no nonce is // available, e.g. at startup. ResponseNonce string `protobuf:"bytes,4,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` // This is populated when the previous MeshConfigResponse failed to // update configuration. The *message* field in *error_details* // provides the client internal exception related to the failure. It // is only intended for consumption during manual debugging, the // string provided is not guaranteed to be stable across client // versions. ErrorDetail *status.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` // contains filtered or unexported fields }
A MeshConfigRequest requests a set of versioned resources of the same type for a given client.
func (*MeshConfigRequest) Descriptor
deprecated
func (*MeshConfigRequest) Descriptor() ([]byte, []int)
Deprecated: Use MeshConfigRequest.ProtoReflect.Descriptor instead.
func (*MeshConfigRequest) GetErrorDetail ¶
func (x *MeshConfigRequest) GetErrorDetail() *status.Status
func (*MeshConfigRequest) GetResponseNonce ¶
func (x *MeshConfigRequest) GetResponseNonce() string
func (*MeshConfigRequest) GetSinkNode ¶
func (x *MeshConfigRequest) GetSinkNode() *SinkNode
func (*MeshConfigRequest) GetTypeUrl ¶
func (x *MeshConfigRequest) GetTypeUrl() string
func (*MeshConfigRequest) GetVersionInfo ¶
func (x *MeshConfigRequest) GetVersionInfo() string
func (*MeshConfigRequest) ProtoMessage ¶
func (*MeshConfigRequest) ProtoMessage()
func (*MeshConfigRequest) ProtoReflect ¶
func (x *MeshConfigRequest) ProtoReflect() protoreflect.Message
func (*MeshConfigRequest) Reset ¶
func (x *MeshConfigRequest) Reset()
func (*MeshConfigRequest) String ¶
func (x *MeshConfigRequest) String() string
type MeshConfigResponse ¶
type MeshConfigResponse struct { // The version of the response data. VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"` // The response resources wrapped in the common MCP *Resource* // message. Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"` // Type URL for resources wrapped in the provided resources(s). This // must be consistent with the type_url in the wrapper messages if // resources is non-empty. TypeUrl string `protobuf:"bytes,3,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` // The nonce provides a way to explicitly ack a specific // MeshConfigResponse in a following MeshConfigRequest. Additional // messages may have been sent by client to the management server for // the previous version on the stream prior to this // MeshConfigResponse, that were unprocessed at response send // time. The nonce allows the management server to ignore any // further MeshConfigRequests for the previous version until a // MeshConfigRequest bearing the nonce. Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` // contains filtered or unexported fields }
A MeshConfigResponse delivers a set of versioned resources of the same type in response to a MeshConfigRequest.
func (*MeshConfigResponse) Descriptor
deprecated
func (*MeshConfigResponse) Descriptor() ([]byte, []int)
Deprecated: Use MeshConfigResponse.ProtoReflect.Descriptor instead.
func (*MeshConfigResponse) GetNonce ¶
func (x *MeshConfigResponse) GetNonce() string
func (*MeshConfigResponse) GetResources ¶
func (x *MeshConfigResponse) GetResources() []*Resource
func (*MeshConfigResponse) GetTypeUrl ¶
func (x *MeshConfigResponse) GetTypeUrl() string
func (*MeshConfigResponse) GetVersionInfo ¶
func (x *MeshConfigResponse) GetVersionInfo() string
func (*MeshConfigResponse) ProtoMessage ¶
func (*MeshConfigResponse) ProtoMessage()
func (*MeshConfigResponse) ProtoReflect ¶
func (x *MeshConfigResponse) ProtoReflect() protoreflect.Message
func (*MeshConfigResponse) Reset ¶
func (x *MeshConfigResponse) Reset()
func (*MeshConfigResponse) String ¶
func (x *MeshConfigResponse) String() string
type Metadata ¶
type Metadata struct { // Fully qualified name of the resource. Unique in context of a collection. // // The fully qualified name consists of a directory and basename. The directory identifies // the resources location in a resource hierarchy. The basename identifies the specific // resource name within the context of that directory. // // The directory and basename are composed of one or more segments. Segments must be // valid [DNS labels](https://tools.ietf.org/html/rfc1123). "/" is the delimiter between // segments // // The rightmost segment is the basename. All segments to the // left of the basename form the directory. Segments moving towards the left // represent higher positions in the resource hierarchy, similar to reverse // DNS notation. e.g. // // /<org>/<team>/<subteam>/<resource basename> // // An empty directory indicates a resource that is located at the root of the // hierarchy, e.g. // // /<globally scoped resource> // // On Kubernetes the resource hierarchy is two-levels: namespaces and // cluster-scoped (i.e. global). // // Namespace resources fully qualified name is of the form: // // "<k8s namespace>/<k8s resource name>" // // Cluster scoped resources are located at the root of the hierarchy and are of the form: // // "/<k8s resource name>" Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The creation timestamp of the resource. CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` // Resource version. This is used to determine when resources change across // resource updates. It should be treated as opaque by consumers/sinks. Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // Map of string keys and values that can be used to organize and categorize // resources within a collection. Labels map[string]string `` /* 153-byte string literal not displayed */ // Map of string keys and values that can be used by source and sink to communicate // arbitrary metadata about this resource. Annotations map[string]string `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
Metadata information that all resources within the Mesh Configuration Protocol must have.
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetAnnotations ¶
func (*Metadata) GetCreateTime ¶
func (*Metadata) GetVersion ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type RequestResources ¶
type RequestResources struct { // The sink node making the request. SinkNode *SinkNode `protobuf:"bytes,1,opt,name=sink_node,json=sinkNode,proto3" json:"sink_node,omitempty"` // Type of resource collection that is being requested, e.g. // // istio/networking/v1alpha3/VirtualService // k8s/<apiVersion>/<kind> Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` // When the RequestResources is the first in a stream, the initial_resource_versions must // be populated. Otherwise, initial_resource_versions must be omitted. The keys are the // resources names of the MCP resources known to the MCP client. The values in the map // are the associated resource level version info. InitialResourceVersions map[string]string `` /* 220-byte string literal not displayed */ // When the RequestResources is an ACK or NACK message in response to a previous RequestResources, // the response_nonce must be the nonce in the RequestResources. Otherwise response_nonce must // be omitted. ResponseNonce string `protobuf:"bytes,4,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"` // This is populated when the previously received resources could not be applied // The *message* field in *error_details* provides the source internal error // related to the failure. ErrorDetail *status.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"` // Request an incremental update for the specified collection. The source may choose to // honor this request or ignore and and provide a full-state update in the corresponding // `Resource` response. Incremental bool `protobuf:"varint,6,opt,name=incremental,proto3" json:"incremental,omitempty"` // contains filtered or unexported fields }
A RequestResource can be sent in two situations:
Initial message in an MCP bidirectional change stream as an ACK or NACK response to a previous Resources. In this case the response_nonce is set to the nonce value in the Resources. ACK/NACK is determined by the presence of error_detail.
* ACK (nonce!="",error_details==nil) * NACK (nonce!="",error_details!=nil) * New/Update request (nonce=="",error_details ignored)
func (*RequestResources) Descriptor
deprecated
func (*RequestResources) Descriptor() ([]byte, []int)
Deprecated: Use RequestResources.ProtoReflect.Descriptor instead.
func (*RequestResources) GetCollection ¶
func (x *RequestResources) GetCollection() string
func (*RequestResources) GetErrorDetail ¶
func (x *RequestResources) GetErrorDetail() *status.Status
func (*RequestResources) GetIncremental ¶
func (x *RequestResources) GetIncremental() bool
func (*RequestResources) GetInitialResourceVersions ¶
func (x *RequestResources) GetInitialResourceVersions() map[string]string
func (*RequestResources) GetResponseNonce ¶
func (x *RequestResources) GetResponseNonce() string
func (*RequestResources) GetSinkNode ¶
func (x *RequestResources) GetSinkNode() *SinkNode
func (*RequestResources) ProtoMessage ¶
func (*RequestResources) ProtoMessage()
func (*RequestResources) ProtoReflect ¶
func (x *RequestResources) ProtoReflect() protoreflect.Message
func (*RequestResources) Reset ¶
func (x *RequestResources) Reset()
func (*RequestResources) String ¶
func (x *RequestResources) String() string
type Resource ¶
type Resource struct { // Common metadata describing the resource. Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` // The primary payload for the resource. Body *any1.Any `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
Resource as transferred via the Mesh Configuration Protocol. Each resource is made up of common metadata, and a type-specific resource payload.
func (*Resource) Descriptor
deprecated
func (*Resource) GetMetadata ¶
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) ProtoReflect ¶
func (x *Resource) ProtoReflect() protoreflect.Message
type ResourceSinkClient ¶
type ResourceSinkClient interface { // The source, acting as gRPC client, establishes a new resource stream // with the sink. The sink sends RequestResources message to and // receives Resources messages from the source. EstablishResourceStream(ctx context.Context, opts ...grpc.CallOption) (ResourceSink_EstablishResourceStreamClient, error) }
ResourceSinkClient is the client API for ResourceSink service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewResourceSinkClient ¶
func NewResourceSinkClient(cc grpc.ClientConnInterface) ResourceSinkClient
type ResourceSinkServer ¶
type ResourceSinkServer interface { // The source, acting as gRPC client, establishes a new resource stream // with the sink. The sink sends RequestResources message to and // receives Resources messages from the source. EstablishResourceStream(ResourceSink_EstablishResourceStreamServer) error // contains filtered or unexported methods }
ResourceSinkServer is the server API for ResourceSink service. All implementations must embed UnimplementedResourceSinkServer for forward compatibility
type ResourceSink_EstablishResourceStreamClient ¶
type ResourceSink_EstablishResourceStreamClient interface { Send(*Resources) error Recv() (*RequestResources, error) grpc.ClientStream }
type ResourceSink_EstablishResourceStreamServer ¶
type ResourceSink_EstablishResourceStreamServer interface { Send(*RequestResources) error Recv() (*Resources, error) grpc.ServerStream }
type ResourceSourceClient ¶
type ResourceSourceClient interface { // The sink, acting as gRPC client, establishes a new resource stream // with the source. The sink sends RequestResources message to // and receives Resources messages from the source. EstablishResourceStream(ctx context.Context, opts ...grpc.CallOption) (ResourceSource_EstablishResourceStreamClient, error) }
ResourceSourceClient is the client API for ResourceSource service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewResourceSourceClient ¶
func NewResourceSourceClient(cc grpc.ClientConnInterface) ResourceSourceClient
type ResourceSourceServer ¶
type ResourceSourceServer interface { // The sink, acting as gRPC client, establishes a new resource stream // with the source. The sink sends RequestResources message to // and receives Resources messages from the source. EstablishResourceStream(ResourceSource_EstablishResourceStreamServer) error // contains filtered or unexported methods }
ResourceSourceServer is the server API for ResourceSource service. All implementations must embed UnimplementedResourceSourceServer for forward compatibility
type ResourceSource_EstablishResourceStreamClient ¶
type ResourceSource_EstablishResourceStreamClient interface { Send(*RequestResources) error Recv() (*Resources, error) grpc.ClientStream }
type ResourceSource_EstablishResourceStreamServer ¶
type ResourceSource_EstablishResourceStreamServer interface { Send(*Resources) error Recv() (*RequestResources, error) grpc.ServerStream }
type Resources ¶
type Resources struct { // The version of the response data (used for debugging). SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"` // Type of resource collection that is being requested, e.g. // // istio/networking/v1alpha3/VirtualService // k8s/<apiVersion>/<kind> Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"` // The response resources wrapped in the common MCP *Resource* message. // These are typed resources that match the type url in the // RequestResources message. // // When `incremental` is true, this contains an array of resources to add/update // for the specified collection. This modifies the existing collection at the sink // // When `incremental` is false, this contains the full set of resources for the // specified collection. This replaces any previously delivered resources. Resources []*Resource `protobuf:"bytes,3,rep,name=resources,proto3" json:"resources,omitempty"` // Names of resources that have been deleted and to be // removed from the MCP sink node. Removed resources for missing // resources can be ignored. // // When `incremental` is true, this contains an array of resource names to remove // for the specified collection. This modifies the existing resource collection at // the sink. // // When `incremental` is false, this field should be ignored. RemovedResources []string `protobuf:"bytes,4,rep,name=removed_resources,json=removedResources,proto3" json:"removed_resources,omitempty"` // Required. The nonce provides a way for RequestChange to uniquely // reference a RequestResources. Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` // This resource response is an incremental update. The source should only send // incremental updates if the sink requested them. Incremental bool `protobuf:"varint,6,opt,name=incremental,proto3" json:"incremental,omitempty"` // contains filtered or unexported fields }
Resources do not need to include a full snapshot of the tracked resources. Instead they are a diff to the state of a MCP client. Per resource versions allow sources and sinks to track state at the resource granularity. An MCP incremental session is always in the context of a gRPC bidirectional stream. This allows the MCP source to keep track of the state of MCP sink connected to it.
In Incremental MCP the nonce field is required and used to pair Resources to an RequestResources ACK or NACK.
func (*Resources) Descriptor
deprecated
func (*Resources) GetCollection ¶
func (*Resources) GetIncremental ¶
func (*Resources) GetRemovedResources ¶
func (*Resources) GetResources ¶
func (*Resources) GetSystemVersionInfo ¶
func (*Resources) ProtoMessage ¶
func (*Resources) ProtoMessage()
func (*Resources) ProtoReflect ¶
func (x *Resources) ProtoReflect() protoreflect.Message
type SinkNode ¶
type SinkNode struct { // An opaque identifier for the MCP node. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Opaque annotations extending the node identifier. Annotations map[string]string `` /* 163-byte string literal not displayed */ // contains filtered or unexported fields }
Identifies a specific MCP sink node instance. The node identifier is presented to the resource source, which may use this identifier to distinguish per sink configuration for serving. This information is not authoritative. Authoritative identity should come from the underlying transport layer (e.g. rpc credentials).
func (*SinkNode) Descriptor
deprecated
func (*SinkNode) GetAnnotations ¶
func (*SinkNode) ProtoMessage ¶
func (*SinkNode) ProtoMessage()
func (*SinkNode) ProtoReflect ¶
func (x *SinkNode) ProtoReflect() protoreflect.Message
type UnimplementedAggregatedMeshConfigServiceServer ¶
type UnimplementedAggregatedMeshConfigServiceServer struct { }
UnimplementedAggregatedMeshConfigServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAggregatedMeshConfigServiceServer) IncrementalAggregatedResources ¶
func (UnimplementedAggregatedMeshConfigServiceServer) IncrementalAggregatedResources(AggregatedMeshConfigService_IncrementalAggregatedResourcesServer) error
func (UnimplementedAggregatedMeshConfigServiceServer) StreamAggregatedResources ¶
func (UnimplementedAggregatedMeshConfigServiceServer) StreamAggregatedResources(AggregatedMeshConfigService_StreamAggregatedResourcesServer) error
type UnimplementedResourceSinkServer ¶
type UnimplementedResourceSinkServer struct { }
UnimplementedResourceSinkServer must be embedded to have forward compatible implementations.
func (UnimplementedResourceSinkServer) EstablishResourceStream ¶
func (UnimplementedResourceSinkServer) EstablishResourceStream(ResourceSink_EstablishResourceStreamServer) error
type UnimplementedResourceSourceServer ¶
type UnimplementedResourceSourceServer struct { }
UnimplementedResourceSourceServer must be embedded to have forward compatible implementations.
func (UnimplementedResourceSourceServer) EstablishResourceStream ¶
func (UnimplementedResourceSourceServer) EstablishResourceStream(ResourceSource_EstablishResourceStreamServer) error
type UnsafeAggregatedMeshConfigServiceServer ¶
type UnsafeAggregatedMeshConfigServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAggregatedMeshConfigServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AggregatedMeshConfigServiceServer will result in compilation errors.
type UnsafeResourceSinkServer ¶
type UnsafeResourceSinkServer interface {
// contains filtered or unexported methods
}
UnsafeResourceSinkServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResourceSinkServer will result in compilation errors.
type UnsafeResourceSourceServer ¶
type UnsafeResourceSourceServer interface {
// contains filtered or unexported methods
}
UnsafeResourceSourceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ResourceSourceServer will result in compilation errors.