v1alpha1

package
v0.0.0-...-f6b6c41 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package v1alpha1 is a generated protocol buffer package.

It is generated from these files:

mcp/v1alpha1/mcp.proto
mcp/v1alpha1/metadata.proto
mcp/v1alpha1/resource.proto

It has these top-level messages:

SinkNode
MeshConfigRequest
MeshConfigResponse
IncrementalMeshConfigRequest
IncrementalMeshConfigResponse
RequestResources
Resources
Metadata
Resource

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMcp = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMcp   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetadata   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowResource   = fmt.Errorf("proto: integer overflow")
)

Functions

func RegisterAggregatedMeshConfigServiceServer

func RegisterAggregatedMeshConfigServiceServer(s *grpc.Server, srv AggregatedMeshConfigServiceServer)

func RegisterResourceSinkServer

func RegisterResourceSinkServer(s *grpc.Server, srv ResourceSinkServer)

func RegisterResourceSourceServer

func RegisterResourceSourceServer(s *grpc.Server, 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)
}

func NewAggregatedMeshConfigServiceClient

func NewAggregatedMeshConfigServiceClient(cc *grpc.ClientConn) 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
}

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" 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 `` /* 213-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 *google_rpc.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail" json:"error_detail,omitempty"`
}

IncrementalMeshConfigRequest are be sent in 2 situations:

  1. Initial message in a MCP bidirectional gRPC stream.

  2. 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

func (*IncrementalMeshConfigRequest) Descriptor() ([]byte, []int)

func (*IncrementalMeshConfigRequest) Equal

func (this *IncrementalMeshConfigRequest) Equal(that interface{}) bool

func (*IncrementalMeshConfigRequest) GetErrorDetail

func (m *IncrementalMeshConfigRequest) GetErrorDetail() *google_rpc.Status

func (*IncrementalMeshConfigRequest) GetInitialResourceVersions

func (m *IncrementalMeshConfigRequest) GetInitialResourceVersions() map[string]string

func (*IncrementalMeshConfigRequest) GetResponseNonce

func (m *IncrementalMeshConfigRequest) GetResponseNonce() string

func (*IncrementalMeshConfigRequest) GetSinkNode

func (m *IncrementalMeshConfigRequest) GetSinkNode() *SinkNode

func (*IncrementalMeshConfigRequest) GetTypeUrl

func (m *IncrementalMeshConfigRequest) GetTypeUrl() string

func (*IncrementalMeshConfigRequest) Marshal

func (m *IncrementalMeshConfigRequest) Marshal() (dAtA []byte, err error)

func (*IncrementalMeshConfigRequest) MarshalTo

func (m *IncrementalMeshConfigRequest) MarshalTo(dAtA []byte) (int, error)

func (*IncrementalMeshConfigRequest) ProtoMessage

func (*IncrementalMeshConfigRequest) ProtoMessage()

func (*IncrementalMeshConfigRequest) Reset

func (m *IncrementalMeshConfigRequest) Reset()

func (*IncrementalMeshConfigRequest) Size

func (m *IncrementalMeshConfigRequest) Size() (n int)

func (*IncrementalMeshConfigRequest) String

func (*IncrementalMeshConfigRequest) Unmarshal

func (m *IncrementalMeshConfigRequest) Unmarshal(dAtA []byte) error

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" json:"resources"`
	// 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" 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"`
}

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

func (*IncrementalMeshConfigResponse) Descriptor() ([]byte, []int)

func (*IncrementalMeshConfigResponse) Equal

func (this *IncrementalMeshConfigResponse) Equal(that interface{}) bool

func (*IncrementalMeshConfigResponse) GetNonce

func (m *IncrementalMeshConfigResponse) GetNonce() string

func (*IncrementalMeshConfigResponse) GetRemovedResources

func (m *IncrementalMeshConfigResponse) GetRemovedResources() []string

func (*IncrementalMeshConfigResponse) GetResources

func (m *IncrementalMeshConfigResponse) GetResources() []Resource

func (*IncrementalMeshConfigResponse) GetSystemVersionInfo

func (m *IncrementalMeshConfigResponse) GetSystemVersionInfo() string

func (*IncrementalMeshConfigResponse) Marshal

func (m *IncrementalMeshConfigResponse) Marshal() (dAtA []byte, err error)

func (*IncrementalMeshConfigResponse) MarshalTo

func (m *IncrementalMeshConfigResponse) MarshalTo(dAtA []byte) (int, error)

func (*IncrementalMeshConfigResponse) ProtoMessage

func (*IncrementalMeshConfigResponse) ProtoMessage()

func (*IncrementalMeshConfigResponse) Reset

func (m *IncrementalMeshConfigResponse) Reset()

func (*IncrementalMeshConfigResponse) Size

func (m *IncrementalMeshConfigResponse) Size() (n int)

func (*IncrementalMeshConfigResponse) String

func (*IncrementalMeshConfigResponse) Unmarshal

func (m *IncrementalMeshConfigResponse) Unmarshal(dAtA []byte) error

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" 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 *google_rpc.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail" json:"error_detail,omitempty"`
}

A MeshConfigRequest requests a set of versioned resources of the same type for a given client.

func (*MeshConfigRequest) Descriptor

func (*MeshConfigRequest) Descriptor() ([]byte, []int)

func (*MeshConfigRequest) Equal

func (this *MeshConfigRequest) Equal(that interface{}) bool

func (*MeshConfigRequest) GetErrorDetail

func (m *MeshConfigRequest) GetErrorDetail() *google_rpc.Status

func (*MeshConfigRequest) GetResponseNonce

func (m *MeshConfigRequest) GetResponseNonce() string

func (*MeshConfigRequest) GetSinkNode

func (m *MeshConfigRequest) GetSinkNode() *SinkNode

func (*MeshConfigRequest) GetTypeUrl

func (m *MeshConfigRequest) GetTypeUrl() string

func (*MeshConfigRequest) GetVersionInfo

func (m *MeshConfigRequest) GetVersionInfo() string

func (*MeshConfigRequest) Marshal

func (m *MeshConfigRequest) Marshal() (dAtA []byte, err error)

func (*MeshConfigRequest) MarshalTo

func (m *MeshConfigRequest) MarshalTo(dAtA []byte) (int, error)

func (*MeshConfigRequest) ProtoMessage

func (*MeshConfigRequest) ProtoMessage()

func (*MeshConfigRequest) Reset

func (m *MeshConfigRequest) Reset()

func (*MeshConfigRequest) Size

func (m *MeshConfigRequest) Size() (n int)

func (*MeshConfigRequest) String

func (m *MeshConfigRequest) String() string

func (*MeshConfigRequest) Unmarshal

func (m *MeshConfigRequest) Unmarshal(dAtA []byte) error

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" json:"resources"`
	// 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"`
}

A MeshConfigResponse delivers a set of versioned resources of the same type in response to a MeshConfigRequest.

func (*MeshConfigResponse) Descriptor

func (*MeshConfigResponse) Descriptor() ([]byte, []int)

func (*MeshConfigResponse) Equal

func (this *MeshConfigResponse) Equal(that interface{}) bool

func (*MeshConfigResponse) GetNonce

func (m *MeshConfigResponse) GetNonce() string

func (*MeshConfigResponse) GetResources

func (m *MeshConfigResponse) GetResources() []Resource

func (*MeshConfigResponse) GetTypeUrl

func (m *MeshConfigResponse) GetTypeUrl() string

func (*MeshConfigResponse) GetVersionInfo

func (m *MeshConfigResponse) GetVersionInfo() string

func (*MeshConfigResponse) Marshal

func (m *MeshConfigResponse) Marshal() (dAtA []byte, err error)

func (*MeshConfigResponse) MarshalTo

func (m *MeshConfigResponse) MarshalTo(dAtA []byte) (int, error)

func (*MeshConfigResponse) ProtoMessage

func (*MeshConfigResponse) ProtoMessage()

func (*MeshConfigResponse) Reset

func (m *MeshConfigResponse) Reset()

func (*MeshConfigResponse) Size

func (m *MeshConfigResponse) Size() (n int)

func (*MeshConfigResponse) String

func (m *MeshConfigResponse) String() string

func (*MeshConfigResponse) Unmarshal

func (m *MeshConfigResponse) Unmarshal(dAtA []byte) error

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 *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime" 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 `` /* 146-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 `` /* 156-byte string literal not displayed */
}

Metadata information that all resources within the Mesh Configuration Protocol must have.

func (*Metadata) Descriptor

func (*Metadata) Descriptor() ([]byte, []int)

func (*Metadata) Equal

func (this *Metadata) Equal(that interface{}) bool

func (*Metadata) GetAnnotations

func (m *Metadata) GetAnnotations() map[string]string

func (*Metadata) GetCreateTime

func (m *Metadata) GetCreateTime() *google_protobuf2.Timestamp

func (*Metadata) GetLabels

func (m *Metadata) GetLabels() map[string]string

func (*Metadata) GetName

func (m *Metadata) GetName() string

func (*Metadata) GetVersion

func (m *Metadata) GetVersion() string

func (*Metadata) Marshal

func (m *Metadata) Marshal() (dAtA []byte, err error)

func (*Metadata) MarshalTo

func (m *Metadata) MarshalTo(dAtA []byte) (int, error)

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) Reset

func (m *Metadata) Reset()

func (*Metadata) Size

func (m *Metadata) Size() (n int)

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) Unmarshal

func (m *Metadata) Unmarshal(dAtA []byte) error

type RequestResources

type RequestResources struct {
	// The sink node making the request.
	SinkNode *SinkNode `protobuf:"bytes,1,opt,name=sink_node,json=sinkNode" 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 `` /* 213-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 *google_rpc.Status `protobuf:"bytes,5,opt,name=error_detail,json=errorDetail" 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"`
}

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

func (*RequestResources) Descriptor() ([]byte, []int)

func (*RequestResources) Equal

func (this *RequestResources) Equal(that interface{}) bool

func (*RequestResources) GetCollection

func (m *RequestResources) GetCollection() string

func (*RequestResources) GetErrorDetail

func (m *RequestResources) GetErrorDetail() *google_rpc.Status

func (*RequestResources) GetIncremental

func (m *RequestResources) GetIncremental() bool

func (*RequestResources) GetInitialResourceVersions

func (m *RequestResources) GetInitialResourceVersions() map[string]string

func (*RequestResources) GetResponseNonce

func (m *RequestResources) GetResponseNonce() string

func (*RequestResources) GetSinkNode

func (m *RequestResources) GetSinkNode() *SinkNode

func (*RequestResources) Marshal

func (m *RequestResources) Marshal() (dAtA []byte, err error)

func (*RequestResources) MarshalTo

func (m *RequestResources) MarshalTo(dAtA []byte) (int, error)

func (*RequestResources) ProtoMessage

func (*RequestResources) ProtoMessage()

func (*RequestResources) Reset

func (m *RequestResources) Reset()

func (*RequestResources) Size

func (m *RequestResources) Size() (n int)

func (*RequestResources) String

func (m *RequestResources) String() string

func (*RequestResources) Unmarshal

func (m *RequestResources) Unmarshal(dAtA []byte) error

type Resource

type Resource struct {
	// Common metadata describing the resource.
	Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata" json:"metadata,omitempty"`
	// The primary payload for the resource.
	Body *google_protobuf.Any `protobuf:"bytes,2,opt,name=body" json:"body,omitempty"`
}

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

func (*Resource) Descriptor() ([]byte, []int)

func (*Resource) Equal

func (this *Resource) Equal(that interface{}) bool

func (*Resource) GetBody

func (m *Resource) GetBody() *google_protobuf.Any

func (*Resource) GetMetadata

func (m *Resource) GetMetadata() *Metadata

func (*Resource) Marshal

func (m *Resource) Marshal() (dAtA []byte, err error)

func (*Resource) MarshalTo

func (m *Resource) MarshalTo(dAtA []byte) (int, error)

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) Reset

func (m *Resource) Reset()

func (*Resource) Size

func (m *Resource) Size() (n int)

func (*Resource) String

func (m *Resource) String() string

func (*Resource) Unmarshal

func (m *Resource) Unmarshal(dAtA []byte) error

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)
}

func NewResourceSinkClient

func NewResourceSinkClient(cc *grpc.ClientConn) 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
}

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)
}

func NewResourceSourceClient

func NewResourceSourceClient(cc *grpc.ClientConn) 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
}

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" json:"resources"`
	// 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" 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"`
}

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

func (*Resources) Descriptor() ([]byte, []int)

func (*Resources) Equal

func (this *Resources) Equal(that interface{}) bool

func (*Resources) GetCollection

func (m *Resources) GetCollection() string

func (*Resources) GetIncremental

func (m *Resources) GetIncremental() bool

func (*Resources) GetNonce

func (m *Resources) GetNonce() string

func (*Resources) GetRemovedResources

func (m *Resources) GetRemovedResources() []string

func (*Resources) GetResources

func (m *Resources) GetResources() []Resource

func (*Resources) GetSystemVersionInfo

func (m *Resources) GetSystemVersionInfo() string

func (*Resources) Marshal

func (m *Resources) Marshal() (dAtA []byte, err error)

func (*Resources) MarshalTo

func (m *Resources) MarshalTo(dAtA []byte) (int, error)

func (*Resources) ProtoMessage

func (*Resources) ProtoMessage()

func (*Resources) Reset

func (m *Resources) Reset()

func (*Resources) Size

func (m *Resources) Size() (n int)

func (*Resources) String

func (m *Resources) String() string

func (*Resources) Unmarshal

func (m *Resources) Unmarshal(dAtA []byte) error

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 `` /* 156-byte string literal not displayed */
}

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

func (*SinkNode) Descriptor() ([]byte, []int)

func (*SinkNode) Equal

func (this *SinkNode) Equal(that interface{}) bool

func (*SinkNode) GetAnnotations

func (m *SinkNode) GetAnnotations() map[string]string

func (*SinkNode) GetId

func (m *SinkNode) GetId() string

func (*SinkNode) Marshal

func (m *SinkNode) Marshal() (dAtA []byte, err error)

func (*SinkNode) MarshalTo

func (m *SinkNode) MarshalTo(dAtA []byte) (int, error)

func (*SinkNode) ProtoMessage

func (*SinkNode) ProtoMessage()

func (*SinkNode) Reset

func (m *SinkNode) Reset()

func (*SinkNode) Size

func (m *SinkNode) Size() (n int)

func (*SinkNode) String

func (m *SinkNode) String() string

func (*SinkNode) Unmarshal

func (m *SinkNode) Unmarshal(dAtA []byte) error

Jump to

Keyboard shortcuts

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