2022-03-30 16:51:56 +00:00
|
|
|
//
|
2023-02-17 21:14:46 +00:00
|
|
|
// Package event provides a service for subscribing to state change events.
|
2022-03-30 16:51:56 +00:00
|
|
|
|
2022-03-23 16:10:03 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
2022-03-30 16:51:56 +00:00
|
|
|
// versions:
|
2023-01-11 14:39:10 +00:00
|
|
|
// protoc-gen-go v1.28.1
|
2022-05-23 14:37:52 +00:00
|
|
|
// protoc (unknown)
|
2023-02-17 21:14:46 +00:00
|
|
|
// source: private/pbsubscribe/subscribe.proto
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-07-13 16:03:27 +00:00
|
|
|
// TODO: ideally we would have prefixed this package as
|
|
|
|
// "hashicorp.consul.internal.subscribe" before releasing but now correcting this will
|
|
|
|
// require a grpc passthrough service shim since the package name is part of
|
|
|
|
// the rpc method dispatch and editing it naively would break backwards
|
|
|
|
// compatibility.
|
|
|
|
|
2020-07-23 00:25:48 +00:00
|
|
|
package pbsubscribe
|
|
|
|
|
|
|
|
import (
|
2023-01-04 16:07:02 +00:00
|
|
|
_ "github.com/hashicorp/consul/proto-public/annotations/ratelimit"
|
2023-02-17 21:14:46 +00:00
|
|
|
pbcommon "github.com/hashicorp/consul/proto/private/pbcommon"
|
|
|
|
pbconfigentry "github.com/hashicorp/consul/proto/private/pbconfigentry"
|
|
|
|
pbservice "github.com/hashicorp/consul/proto/private/pbservice"
|
2022-03-30 16:51:56 +00:00
|
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
|
|
reflect "reflect"
|
|
|
|
sync "sync"
|
2020-07-23 00:25:48 +00:00
|
|
|
)
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
const (
|
|
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
|
|
)
|
2020-07-23 00:25:48 +00:00
|
|
|
|
|
|
|
// Topic enumerates the supported event topics.
|
|
|
|
type Topic int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
Topic_Unknown Topic = 0
|
|
|
|
// ServiceHealth topic contains events for any changes to service health.
|
|
|
|
Topic_ServiceHealth Topic = 1
|
|
|
|
// ServiceHealthConnect topic contains events for any changes to service
|
|
|
|
// health for connect-enabled services.
|
|
|
|
Topic_ServiceHealthConnect Topic = 2
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
// MeshConfig topic contains events for changes to the global mesh config.
|
|
|
|
Topic_MeshConfig Topic = 3
|
|
|
|
// ServiceResolver topic contains events for changes to a service resolver.
|
|
|
|
Topic_ServiceResolver Topic = 4
|
2022-10-24 18:50:28 +00:00
|
|
|
// IngressGateway topic contains events for changes to an ingress gateway.
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
Topic_IngressGateway Topic = 5
|
2022-07-01 15:15:49 +00:00
|
|
|
// ServiceIntentions topic contains events for changes to service intentions.
|
|
|
|
Topic_ServiceIntentions Topic = 6
|
2022-07-12 10:35:52 +00:00
|
|
|
// ServiceList topic contains events about services (not service instances)
|
|
|
|
// getting registered/deregistered. It can be used to materialize a list of
|
|
|
|
// the services in the given datacenter.
|
|
|
|
//
|
|
|
|
// Note: WildcardSubject is the only supported Subject on this topic.
|
|
|
|
Topic_ServiceList Topic = 7
|
2022-10-24 18:50:28 +00:00
|
|
|
// ServiceDefaults topic contains events for changes to service-defaults.
|
|
|
|
Topic_ServiceDefaults Topic = 8
|
2023-01-18 22:14:34 +00:00
|
|
|
// APIGateway topic contains events for changes to api-gateways.
|
|
|
|
Topic_APIGateway Topic = 9
|
|
|
|
// TCPRoute topic contains events for changes to tcp-routes.
|
|
|
|
Topic_TCPRoute Topic = 10
|
|
|
|
// HTTPRoute topic contains events for changes to http-routes.
|
|
|
|
Topic_HTTPRoute Topic = 11
|
|
|
|
// InlineCertificate topic contains events for changes to inline-certificates.
|
|
|
|
Topic_InlineCertificate Topic = 12
|
|
|
|
// BoundAPIGateway topic contains events for changes to bound-api-gateways.
|
|
|
|
Topic_BoundAPIGateway Topic = 13
|
2020-07-23 00:25:48 +00:00
|
|
|
)
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
// Enum value maps for Topic.
|
|
|
|
var (
|
|
|
|
Topic_name = map[int32]string{
|
2023-01-18 22:14:34 +00:00
|
|
|
0: "Unknown",
|
|
|
|
1: "ServiceHealth",
|
|
|
|
2: "ServiceHealthConnect",
|
|
|
|
3: "MeshConfig",
|
|
|
|
4: "ServiceResolver",
|
|
|
|
5: "IngressGateway",
|
|
|
|
6: "ServiceIntentions",
|
|
|
|
7: "ServiceList",
|
|
|
|
8: "ServiceDefaults",
|
|
|
|
9: "APIGateway",
|
|
|
|
10: "TCPRoute",
|
|
|
|
11: "HTTPRoute",
|
|
|
|
12: "InlineCertificate",
|
|
|
|
13: "BoundAPIGateway",
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
Topic_value = map[string]int32{
|
|
|
|
"Unknown": 0,
|
|
|
|
"ServiceHealth": 1,
|
|
|
|
"ServiceHealthConnect": 2,
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
"MeshConfig": 3,
|
|
|
|
"ServiceResolver": 4,
|
|
|
|
"IngressGateway": 5,
|
2022-07-01 15:15:49 +00:00
|
|
|
"ServiceIntentions": 6,
|
2022-07-12 10:35:52 +00:00
|
|
|
"ServiceList": 7,
|
2022-10-24 18:50:28 +00:00
|
|
|
"ServiceDefaults": 8,
|
2023-01-18 22:14:34 +00:00
|
|
|
"APIGateway": 9,
|
|
|
|
"TCPRoute": 10,
|
|
|
|
"HTTPRoute": 11,
|
|
|
|
"InlineCertificate": 12,
|
|
|
|
"BoundAPIGateway": 13,
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
)
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x Topic) Enum() *Topic {
|
|
|
|
p := new(Topic)
|
|
|
|
*p = x
|
|
|
|
return p
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x Topic) String() string {
|
2022-03-30 16:51:56 +00:00
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (Topic) Descriptor() protoreflect.EnumDescriptor {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_enumTypes[0].Descriptor()
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (Topic) Type() protoreflect.EnumType {
|
2023-02-17 21:14:46 +00:00
|
|
|
return &file_private_pbsubscribe_subscribe_proto_enumTypes[0]
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x Topic) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
// Deprecated: Use Topic.Descriptor instead.
|
2020-07-23 00:25:48 +00:00
|
|
|
func (Topic) EnumDescriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{0}
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type CatalogOp int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
CatalogOp_Register CatalogOp = 0
|
|
|
|
CatalogOp_Deregister CatalogOp = 1
|
|
|
|
)
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
// Enum value maps for CatalogOp.
|
|
|
|
var (
|
|
|
|
CatalogOp_name = map[int32]string{
|
|
|
|
0: "Register",
|
|
|
|
1: "Deregister",
|
|
|
|
}
|
|
|
|
CatalogOp_value = map[string]int32{
|
|
|
|
"Register": 0,
|
|
|
|
"Deregister": 1,
|
|
|
|
}
|
|
|
|
)
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x CatalogOp) Enum() *CatalogOp {
|
|
|
|
p := new(CatalogOp)
|
|
|
|
*p = x
|
|
|
|
return p
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x CatalogOp) String() string {
|
2022-03-30 16:51:56 +00:00
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (CatalogOp) Descriptor() protoreflect.EnumDescriptor {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_enumTypes[1].Descriptor()
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (CatalogOp) Type() protoreflect.EnumType {
|
2023-02-17 21:14:46 +00:00
|
|
|
return &file_private_pbsubscribe_subscribe_proto_enumTypes[1]
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x CatalogOp) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
// Deprecated: Use CatalogOp.Descriptor instead.
|
2020-07-23 00:25:48 +00:00
|
|
|
func (CatalogOp) EnumDescriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{1}
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
type ConfigEntryUpdate_UpdateOp int32
|
|
|
|
|
|
|
|
const (
|
|
|
|
ConfigEntryUpdate_Upsert ConfigEntryUpdate_UpdateOp = 0
|
|
|
|
ConfigEntryUpdate_Delete ConfigEntryUpdate_UpdateOp = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
// Enum value maps for ConfigEntryUpdate_UpdateOp.
|
|
|
|
var (
|
|
|
|
ConfigEntryUpdate_UpdateOp_name = map[int32]string{
|
|
|
|
0: "Upsert",
|
|
|
|
1: "Delete",
|
|
|
|
}
|
|
|
|
ConfigEntryUpdate_UpdateOp_value = map[string]int32{
|
|
|
|
"Upsert": 0,
|
|
|
|
"Delete": 1,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func (x ConfigEntryUpdate_UpdateOp) Enum() *ConfigEntryUpdate_UpdateOp {
|
|
|
|
p := new(ConfigEntryUpdate_UpdateOp)
|
|
|
|
*p = x
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x ConfigEntryUpdate_UpdateOp) String() string {
|
|
|
|
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ConfigEntryUpdate_UpdateOp) Descriptor() protoreflect.EnumDescriptor {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_enumTypes[2].Descriptor()
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (ConfigEntryUpdate_UpdateOp) Type() protoreflect.EnumType {
|
2023-02-17 21:14:46 +00:00
|
|
|
return &file_private_pbsubscribe_subscribe_proto_enumTypes[2]
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x ConfigEntryUpdate_UpdateOp) Number() protoreflect.EnumNumber {
|
|
|
|
return protoreflect.EnumNumber(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use ConfigEntryUpdate_UpdateOp.Descriptor instead.
|
|
|
|
func (ConfigEntryUpdate_UpdateOp) EnumDescriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{5, 0}
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type NamedSubject struct {
|
2022-03-30 16:51:56 +00:00
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
2020-07-23 00:25:48 +00:00
|
|
|
// Key is a topic-specific identifier that restricts the scope of the
|
|
|
|
// subscription to only events pertaining to that identifier. For example,
|
2022-01-28 12:27:00 +00:00
|
|
|
// to receive events for a single service, the service's name is specified
|
|
|
|
// as the key.
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
|
|
|
|
// Namespace which contains the resources. If Namespace is not specified the
|
|
|
|
// default namespace will be used.
|
|
|
|
//
|
|
|
|
// Namespace is an enterprise-only feature.
|
|
|
|
Namespace string `protobuf:"bytes,2,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
|
|
|
|
// Partition which contains the resources. If Partition is not specified the
|
|
|
|
// default partition will be used.
|
|
|
|
//
|
|
|
|
// Partition is an enterprise-only feature.
|
|
|
|
Partition string `protobuf:"bytes,3,opt,name=Partition,proto3" json:"Partition,omitempty"`
|
|
|
|
// PeerName is the name of the peer that the requested service was imported from.
|
|
|
|
PeerName string `protobuf:"bytes,4,opt,name=PeerName,proto3" json:"PeerName,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *NamedSubject) Reset() {
|
|
|
|
*x = NamedSubject{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[0]
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *NamedSubject) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*NamedSubject) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *NamedSubject) ProtoReflect() protoreflect.Message {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[0]
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
return ms
|
|
|
|
}
|
|
|
|
return mi.MessageOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use NamedSubject.ProtoReflect.Descriptor instead.
|
|
|
|
func (*NamedSubject) Descriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{0}
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *NamedSubject) GetKey() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Key
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *NamedSubject) GetNamespace() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Namespace
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *NamedSubject) GetPartition() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Partition
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *NamedSubject) GetPeerName() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.PeerName
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
// SubscribeRequest used to subscribe to a topic.
|
|
|
|
type SubscribeRequest struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
// Topic identifies the set of events the subscriber is interested in.
|
|
|
|
Topic Topic `protobuf:"varint,1,opt,name=Topic,proto3,enum=subscribe.Topic" json:"Topic,omitempty"`
|
|
|
|
// Deprecated: use NamedSubject.Key instead.
|
2020-07-23 00:25:48 +00:00
|
|
|
Key string `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
|
|
|
|
// Token is the ACL token to authenticate the request. The token must have
|
|
|
|
// sufficient privileges to read the requested information otherwise events
|
|
|
|
// will be filtered, possibly resulting in an empty snapshot and no further
|
|
|
|
// updates sent.
|
|
|
|
Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"`
|
|
|
|
// Index is the raft index the subscriber has already observed up to. This
|
|
|
|
// is zero on an initial streaming call, but then can be provided by a
|
|
|
|
// client on subsequent re-connections such that the full snapshot doesn't
|
|
|
|
// need to be resent if the client is up to date.
|
|
|
|
Index uint64 `protobuf:"varint,4,opt,name=Index,proto3" json:"Index,omitempty"`
|
|
|
|
// Datacenter specifies the Consul datacenter the request is targeted at.
|
|
|
|
// If it's not the local DC the server will forward the request to
|
|
|
|
// the remote DC and proxy the results back to the subscriber. An empty
|
|
|
|
// string defaults to the local datacenter.
|
2020-10-27 17:27:42 +00:00
|
|
|
Datacenter string `protobuf:"bytes,5,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
// Deprecated: use NamedSubject.Namespace instead.
|
2021-07-22 19:33:22 +00:00
|
|
|
Namespace string `protobuf:"bytes,6,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
// Deprecated: use NamedSubject.Partition instead.
|
2022-03-30 16:51:56 +00:00
|
|
|
Partition string `protobuf:"bytes,7,opt,name=Partition,proto3" json:"Partition,omitempty"`
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
// Deprecated: use NamedSubject.PeerName instead.
|
peering: initial sync (#12842)
- Add endpoints related to peering: read, list, generate token, initiate peering
- Update node/service/check table indexing to account for peers
- Foundational changes for pushing service updates to a peer
- Plumb peer name through Health.ServiceNodes path
see: ENT-1765, ENT-1280, ENT-1283, ENT-1283, ENT-1756, ENT-1739, ENT-1750, ENT-1679,
ENT-1709, ENT-1704, ENT-1690, ENT-1689, ENT-1702, ENT-1701, ENT-1683, ENT-1663,
ENT-1650, ENT-1678, ENT-1628, ENT-1658, ENT-1640, ENT-1637, ENT-1597, ENT-1634,
ENT-1613, ENT-1616, ENT-1617, ENT-1591, ENT-1588, ENT-1596, ENT-1572, ENT-1555
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
Co-authored-by: Evan Culver <eculver@hashicorp.com>
Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
2022-04-21 22:34:40 +00:00
|
|
|
PeerName string `protobuf:"bytes,8,opt,name=PeerName,proto3" json:"PeerName,omitempty"`
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
// Subject identifies a portion of a topic for which the subscriber wishes to
|
|
|
|
// receive events (e.g. health events for a particular service).
|
|
|
|
//
|
|
|
|
// Types that are assignable to Subject:
|
2022-10-21 19:58:06 +00:00
|
|
|
//
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
// *SubscribeRequest_WildcardSubject
|
|
|
|
// *SubscribeRequest_NamedSubject
|
|
|
|
Subject isSubscribeRequest_Subject `protobuf_oneof:"Subject"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) Reset() {
|
|
|
|
*x = SubscribeRequest{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[1]
|
2022-03-30 16:51:56 +00:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-23 16:10:03 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
|
|
|
|
func (*SubscribeRequest) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[1]
|
2022-03-30 16:51:56 +00:00
|
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
return ms
|
|
|
|
}
|
|
|
|
return mi.MessageOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
// Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
|
|
|
|
func (*SubscribeRequest) Descriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{1}
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) GetTopic() Topic {
|
|
|
|
if x != nil {
|
|
|
|
return x.Topic
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return Topic_Unknown
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) GetKey() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Key
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) GetToken() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Token
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) GetIndex() uint64 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Index
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) GetDatacenter() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Datacenter
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) GetNamespace() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Namespace
|
2020-10-27 17:27:42 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *SubscribeRequest) GetPartition() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Partition
|
2021-07-22 19:33:22 +00:00
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
peering: initial sync (#12842)
- Add endpoints related to peering: read, list, generate token, initiate peering
- Update node/service/check table indexing to account for peers
- Foundational changes for pushing service updates to a peer
- Plumb peer name through Health.ServiceNodes path
see: ENT-1765, ENT-1280, ENT-1283, ENT-1283, ENT-1756, ENT-1739, ENT-1750, ENT-1679,
ENT-1709, ENT-1704, ENT-1690, ENT-1689, ENT-1702, ENT-1701, ENT-1683, ENT-1663,
ENT-1650, ENT-1678, ENT-1628, ENT-1658, ENT-1640, ENT-1637, ENT-1597, ENT-1634,
ENT-1613, ENT-1616, ENT-1617, ENT-1591, ENT-1588, ENT-1596, ENT-1572, ENT-1555
Co-authored-by: R.B. Boyer <rb@hashicorp.com>
Co-authored-by: freddygv <freddy@hashicorp.com>
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
Co-authored-by: Evan Culver <eculver@hashicorp.com>
Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
2022-04-21 22:34:40 +00:00
|
|
|
func (x *SubscribeRequest) GetPeerName() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.PeerName
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
func (m *SubscribeRequest) GetSubject() isSubscribeRequest_Subject {
|
|
|
|
if m != nil {
|
|
|
|
return m.Subject
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *SubscribeRequest) GetWildcardSubject() bool {
|
|
|
|
if x, ok := x.GetSubject().(*SubscribeRequest_WildcardSubject); ok {
|
|
|
|
return x.WildcardSubject
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *SubscribeRequest) GetNamedSubject() *NamedSubject {
|
|
|
|
if x, ok := x.GetSubject().(*SubscribeRequest_NamedSubject); ok {
|
|
|
|
return x.NamedSubject
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type isSubscribeRequest_Subject interface {
|
|
|
|
isSubscribeRequest_Subject()
|
|
|
|
}
|
|
|
|
|
|
|
|
type SubscribeRequest_WildcardSubject struct {
|
|
|
|
// WildcardSubject is used to subscribe to all events published on the topic
|
|
|
|
// if it is supported.
|
|
|
|
WildcardSubject bool `protobuf:"varint,9,opt,name=WildcardSubject,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SubscribeRequest_NamedSubject struct {
|
|
|
|
// NamedSubject is used to subscribe to events pertaining to a specific
|
|
|
|
// resource (e.g. a particular service or config entry).
|
|
|
|
NamedSubject *NamedSubject `protobuf:"bytes,10,opt,name=NamedSubject,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*SubscribeRequest_WildcardSubject) isSubscribeRequest_Subject() {}
|
|
|
|
|
|
|
|
func (*SubscribeRequest_NamedSubject) isSubscribeRequest_Subject() {}
|
|
|
|
|
2020-07-23 00:25:48 +00:00
|
|
|
// Event describes a streaming update on a subscription. Events are used both to
|
|
|
|
// describe the current "snapshot" of the result as well as ongoing mutations to
|
|
|
|
// that snapshot.
|
|
|
|
type Event struct {
|
2022-03-30 16:51:56 +00:00
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
2020-07-23 00:25:48 +00:00
|
|
|
// Index is the raft index at which the mutation took place. At the top
|
|
|
|
// level of a subscription there will always be at most one Event per index.
|
|
|
|
// If multiple events are published to the same topic in a single raft
|
|
|
|
// transaction then the batch of events will be encoded inside a single
|
|
|
|
// top-level event to ensure they are delivered atomically to clients.
|
2020-10-27 17:53:11 +00:00
|
|
|
Index uint64 `protobuf:"varint,1,opt,name=Index,proto3" json:"Index,omitempty"`
|
2020-07-23 00:25:48 +00:00
|
|
|
// Payload is the actual event content.
|
|
|
|
//
|
2022-03-30 16:51:56 +00:00
|
|
|
// Types that are assignable to Payload:
|
2022-10-21 19:58:06 +00:00
|
|
|
//
|
2020-07-23 00:25:48 +00:00
|
|
|
// *Event_EndOfSnapshot
|
2020-10-01 18:41:47 +00:00
|
|
|
// *Event_NewSnapshotToFollow
|
2020-07-23 00:25:48 +00:00
|
|
|
// *Event_EventBatch
|
|
|
|
// *Event_ServiceHealth
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
// *Event_ConfigEntry
|
2022-07-12 10:35:52 +00:00
|
|
|
// *Event_Service
|
2022-03-30 16:51:56 +00:00
|
|
|
Payload isEvent_Payload `protobuf_oneof:"Payload"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *Event) Reset() {
|
|
|
|
*x = Event{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[2]
|
2022-03-30 16:51:56 +00:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-23 16:10:03 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *Event) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
|
|
|
|
func (*Event) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *Event) ProtoReflect() protoreflect.Message {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[2]
|
2022-03-30 16:51:56 +00:00
|
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
return ms
|
|
|
|
}
|
|
|
|
return mi.MessageOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
|
|
|
|
// Deprecated: Use Event.ProtoReflect.Descriptor instead.
|
|
|
|
func (*Event) Descriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{2}
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
|
|
|
|
func (x *Event) GetIndex() uint64 {
|
|
|
|
if x != nil {
|
|
|
|
return x.Index
|
|
|
|
}
|
|
|
|
return 0
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
|
|
|
|
func (m *Event) GetPayload() isEvent_Payload {
|
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
|
|
|
}
|
|
|
|
return nil
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *Event) GetEndOfSnapshot() bool {
|
|
|
|
if x, ok := x.GetPayload().(*Event_EndOfSnapshot); ok {
|
|
|
|
return x.EndOfSnapshot
|
|
|
|
}
|
|
|
|
return false
|
|
|
|
}
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *Event) GetNewSnapshotToFollow() bool {
|
|
|
|
if x, ok := x.GetPayload().(*Event_NewSnapshotToFollow); ok {
|
|
|
|
return x.NewSnapshotToFollow
|
2022-03-23 16:10:03 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Event) GetEventBatch() *EventBatch {
|
|
|
|
if x, ok := x.GetPayload().(*Event_EventBatch); ok {
|
|
|
|
return x.EventBatch
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *Event) GetServiceHealth() *ServiceHealthUpdate {
|
|
|
|
if x, ok := x.GetPayload().(*Event_ServiceHealth); ok {
|
|
|
|
return x.ServiceHealth
|
|
|
|
}
|
|
|
|
return nil
|
2022-03-23 16:10:03 +00:00
|
|
|
}
|
|
|
|
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
func (x *Event) GetConfigEntry() *ConfigEntryUpdate {
|
|
|
|
if x, ok := x.GetPayload().(*Event_ConfigEntry); ok {
|
|
|
|
return x.ConfigEntry
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-07-12 10:35:52 +00:00
|
|
|
func (x *Event) GetService() *ServiceListUpdate {
|
|
|
|
if x, ok := x.GetPayload().(*Event_Service); ok {
|
|
|
|
return x.Service
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-07-23 00:25:48 +00:00
|
|
|
type isEvent_Payload interface {
|
|
|
|
isEvent_Payload()
|
|
|
|
}
|
|
|
|
|
|
|
|
type Event_EndOfSnapshot struct {
|
2022-03-30 16:51:56 +00:00
|
|
|
// EndOfSnapshot indicates the event stream for the initial snapshot has
|
|
|
|
// ended. Subsequent Events delivered will be mutations to that result.
|
2022-03-23 16:10:03 +00:00
|
|
|
EndOfSnapshot bool `protobuf:"varint,2,opt,name=EndOfSnapshot,proto3,oneof"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-23 16:10:03 +00:00
|
|
|
|
2020-10-01 18:41:47 +00:00
|
|
|
type Event_NewSnapshotToFollow struct {
|
2022-03-30 16:51:56 +00:00
|
|
|
// NewSnapshotToFollow indicates that the client view is stale. The client
|
|
|
|
// must reset its view before handing any more events. Subsequent events
|
|
|
|
// in the stream will be for a new snapshot until an EndOfSnapshot event
|
|
|
|
// is received.
|
2022-03-23 16:10:03 +00:00
|
|
|
NewSnapshotToFollow bool `protobuf:"varint,3,opt,name=NewSnapshotToFollow,proto3,oneof"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-23 16:10:03 +00:00
|
|
|
|
2020-07-23 00:25:48 +00:00
|
|
|
type Event_EventBatch struct {
|
2022-03-30 16:51:56 +00:00
|
|
|
// EventBatch is a set of events. This is typically used as the payload
|
|
|
|
// type where multiple events are emitted in a single topic and raft
|
|
|
|
// index (e.g. transactional updates). In this case the Topic and Index
|
|
|
|
// values of all events will match and the whole set should be delivered
|
|
|
|
// and consumed atomically.
|
2022-03-23 16:10:03 +00:00
|
|
|
EventBatch *EventBatch `protobuf:"bytes,4,opt,name=EventBatch,proto3,oneof"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-23 16:10:03 +00:00
|
|
|
|
2020-07-23 00:25:48 +00:00
|
|
|
type Event_ServiceHealth struct {
|
2022-03-30 16:51:56 +00:00
|
|
|
// ServiceHealth is used for ServiceHealth and ServiceHealthConnect
|
|
|
|
// topics.
|
2022-03-23 16:10:03 +00:00
|
|
|
ServiceHealth *ServiceHealthUpdate `protobuf:"bytes,10,opt,name=ServiceHealth,proto3,oneof"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
type Event_ConfigEntry struct {
|
|
|
|
// ConfigEntry is used for config entry topics (e.g. MeshConfig).
|
|
|
|
ConfigEntry *ConfigEntryUpdate `protobuf:"bytes,11,opt,name=ConfigEntry,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
2022-07-12 10:35:52 +00:00
|
|
|
type Event_Service struct {
|
|
|
|
// Service is used for ServiceList topic.
|
|
|
|
Service *ServiceListUpdate `protobuf:"bytes,12,opt,name=Service,proto3,oneof"`
|
|
|
|
}
|
|
|
|
|
2022-03-23 16:10:03 +00:00
|
|
|
func (*Event_EndOfSnapshot) isEvent_Payload() {}
|
|
|
|
|
2020-10-01 18:41:47 +00:00
|
|
|
func (*Event_NewSnapshotToFollow) isEvent_Payload() {}
|
2022-03-23 16:10:03 +00:00
|
|
|
|
|
|
|
func (*Event_EventBatch) isEvent_Payload() {}
|
|
|
|
|
|
|
|
func (*Event_ServiceHealth) isEvent_Payload() {}
|
2020-07-23 00:25:48 +00:00
|
|
|
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
func (*Event_ConfigEntry) isEvent_Payload() {}
|
|
|
|
|
2022-07-12 10:35:52 +00:00
|
|
|
func (*Event_Service) isEvent_Payload() {}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
type EventBatch struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
Events []*Event `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *EventBatch) Reset() {
|
|
|
|
*x = EventBatch{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[3]
|
2022-03-30 16:51:56 +00:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *EventBatch) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (*EventBatch) ProtoMessage() {}
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *EventBatch) ProtoReflect() protoreflect.Message {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[3]
|
2022-03-30 16:51:56 +00:00
|
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
return ms
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
return mi.MessageOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
// Deprecated: Use EventBatch.ProtoReflect.Descriptor instead.
|
2020-07-23 00:25:48 +00:00
|
|
|
func (*EventBatch) Descriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{3}
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *EventBatch) GetEvents() []*Event {
|
|
|
|
if x != nil {
|
|
|
|
return x.Events
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ServiceHealthUpdate struct {
|
2022-03-30 16:51:56 +00:00
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
Op CatalogOp `protobuf:"varint,1,opt,name=Op,proto3,enum=subscribe.CatalogOp" json:"Op,omitempty"`
|
|
|
|
CheckServiceNode *pbservice.CheckServiceNode `protobuf:"bytes,2,opt,name=CheckServiceNode,proto3" json:"CheckServiceNode,omitempty"`
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-23 16:10:03 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *ServiceHealthUpdate) Reset() {
|
|
|
|
*x = ServiceHealthUpdate{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[4]
|
2022-03-30 16:51:56 +00:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
|
|
|
|
func (x *ServiceHealthUpdate) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
|
|
|
|
func (*ServiceHealthUpdate) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *ServiceHealthUpdate) ProtoReflect() protoreflect.Message {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[4]
|
2022-03-30 16:51:56 +00:00
|
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
return ms
|
|
|
|
}
|
|
|
|
return mi.MessageOf(x)
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
// Deprecated: Use ServiceHealthUpdate.ProtoReflect.Descriptor instead.
|
|
|
|
func (*ServiceHealthUpdate) Descriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{4}
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
2020-07-23 00:25:48 +00:00
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *ServiceHealthUpdate) GetOp() CatalogOp {
|
|
|
|
if x != nil {
|
|
|
|
return x.Op
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return CatalogOp_Register
|
|
|
|
}
|
|
|
|
|
2022-03-30 16:51:56 +00:00
|
|
|
func (x *ServiceHealthUpdate) GetCheckServiceNode() *pbservice.CheckServiceNode {
|
|
|
|
if x != nil {
|
|
|
|
return x.CheckServiceNode
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
type ConfigEntryUpdate struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
Op ConfigEntryUpdate_UpdateOp `protobuf:"varint,1,opt,name=Op,proto3,enum=subscribe.ConfigEntryUpdate_UpdateOp" json:"Op,omitempty"`
|
|
|
|
ConfigEntry *pbconfigentry.ConfigEntry `protobuf:"bytes,2,opt,name=ConfigEntry,proto3" json:"ConfigEntry,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ConfigEntryUpdate) Reset() {
|
|
|
|
*x = ConfigEntryUpdate{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[5]
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ConfigEntryUpdate) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ConfigEntryUpdate) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *ConfigEntryUpdate) ProtoReflect() protoreflect.Message {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[5]
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
return ms
|
|
|
|
}
|
|
|
|
return mi.MessageOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use ConfigEntryUpdate.ProtoReflect.Descriptor instead.
|
|
|
|
func (*ConfigEntryUpdate) Descriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{5}
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ConfigEntryUpdate) GetOp() ConfigEntryUpdate_UpdateOp {
|
|
|
|
if x != nil {
|
|
|
|
return x.Op
|
|
|
|
}
|
|
|
|
return ConfigEntryUpdate_Upsert
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ConfigEntryUpdate) GetConfigEntry() *pbconfigentry.ConfigEntry {
|
|
|
|
if x != nil {
|
|
|
|
return x.ConfigEntry
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2022-07-12 10:35:52 +00:00
|
|
|
type ServiceListUpdate struct {
|
|
|
|
state protoimpl.MessageState
|
|
|
|
sizeCache protoimpl.SizeCache
|
|
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
|
|
|
|
Op CatalogOp `protobuf:"varint,1,opt,name=Op,proto3,enum=subscribe.CatalogOp" json:"Op,omitempty"`
|
|
|
|
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
|
|
|
|
EnterpriseMeta *pbcommon.EnterpriseMeta `protobuf:"bytes,3,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta,omitempty"`
|
|
|
|
PeerName string `protobuf:"bytes,4,opt,name=PeerName,proto3" json:"PeerName,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ServiceListUpdate) Reset() {
|
|
|
|
*x = ServiceListUpdate{}
|
|
|
|
if protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[6]
|
2022-07-12 10:35:52 +00:00
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ServiceListUpdate) String() string {
|
|
|
|
return protoimpl.X.MessageStringOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (*ServiceListUpdate) ProtoMessage() {}
|
|
|
|
|
|
|
|
func (x *ServiceListUpdate) ProtoReflect() protoreflect.Message {
|
2023-02-17 21:14:46 +00:00
|
|
|
mi := &file_private_pbsubscribe_subscribe_proto_msgTypes[6]
|
2022-07-12 10:35:52 +00:00
|
|
|
if protoimpl.UnsafeEnabled && x != nil {
|
|
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
|
|
if ms.LoadMessageInfo() == nil {
|
|
|
|
ms.StoreMessageInfo(mi)
|
|
|
|
}
|
|
|
|
return ms
|
|
|
|
}
|
|
|
|
return mi.MessageOf(x)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Deprecated: Use ServiceListUpdate.ProtoReflect.Descriptor instead.
|
|
|
|
func (*ServiceListUpdate) Descriptor() ([]byte, []int) {
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescGZIP(), []int{6}
|
2022-07-12 10:35:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ServiceListUpdate) GetOp() CatalogOp {
|
|
|
|
if x != nil {
|
|
|
|
return x.Op
|
|
|
|
}
|
|
|
|
return CatalogOp_Register
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ServiceListUpdate) GetName() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.Name
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ServiceListUpdate) GetEnterpriseMeta() *pbcommon.EnterpriseMeta {
|
|
|
|
if x != nil {
|
|
|
|
return x.EnterpriseMeta
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (x *ServiceListUpdate) GetPeerName() string {
|
|
|
|
if x != nil {
|
|
|
|
return x.PeerName
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2023-02-17 21:14:46 +00:00
|
|
|
var File_private_pbsubscribe_subscribe_proto protoreflect.FileDescriptor
|
|
|
|
|
|
|
|
var file_private_pbsubscribe_subscribe_proto_rawDesc = []byte{
|
|
|
|
0x0a, 0x23, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73,
|
|
|
|
0x63, 0x72, 0x69, 0x62, 0x65, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
|
|
|
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65,
|
|
|
|
0x1a, 0x25, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x61,
|
|
|
|
0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69,
|
|
|
|
0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
|
|
|
|
0x2f, 0x70, 0x62, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
|
|
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f,
|
|
|
|
0x70, 0x62, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x63, 0x6f,
|
|
|
|
0x6e, 0x66, 0x69, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
|
|
|
0x1a, 0x1c, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x62, 0x73, 0x65, 0x72, 0x76,
|
|
|
|
0x69, 0x63, 0x65, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x78,
|
|
|
|
0x0a, 0x0c, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x10,
|
|
|
|
0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79,
|
|
|
|
0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20,
|
|
|
|
0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1c,
|
|
|
|
0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
|
|
|
|
0x09, 0x52, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
|
|
|
|
0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
|
|
|
0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xe6, 0x02, 0x0a, 0x10, 0x53, 0x75, 0x62,
|
|
|
|
0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, 0x0a,
|
|
|
|
0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x73,
|
|
|
|
0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x52, 0x05,
|
|
|
|
0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
|
|
|
|
0x28, 0x09, 0x52, 0x03, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
|
|
|
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a,
|
|
|
|
0x05, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x49, 0x6e,
|
|
|
|
0x64, 0x65, 0x78, 0x12, 0x1e, 0x0a, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e, 0x74, 0x65,
|
|
|
|
0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x63, 0x65, 0x6e,
|
|
|
|
0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
|
|
|
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
|
|
|
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07,
|
|
|
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
|
|
|
0x1a, 0x0a, 0x08, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
|
|
|
|
0x09, 0x52, 0x08, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x0f, 0x57,
|
|
|
|
0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x09,
|
|
|
|
0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0f, 0x57, 0x69, 0x6c, 0x64, 0x63, 0x61, 0x72, 0x64,
|
|
|
|
0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x3d, 0x0a, 0x0c, 0x4e, 0x61, 0x6d, 0x65, 0x64,
|
|
|
|
0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
|
|
|
0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53,
|
|
|
|
0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x53,
|
|
|
|
0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x09, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63,
|
|
|
|
0x74, 0x22, 0x81, 0x03, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x49,
|
|
|
|
0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x49, 0x6e, 0x64, 0x65,
|
|
|
|
0x78, 0x12, 0x26, 0x0a, 0x0d, 0x45, 0x6e, 0x64, 0x4f, 0x66, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68,
|
|
|
|
0x6f, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0d, 0x45, 0x6e, 0x64, 0x4f,
|
|
|
|
0x66, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x32, 0x0a, 0x13, 0x4e, 0x65, 0x77,
|
|
|
|
0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x6f, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77,
|
|
|
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x13, 0x4e, 0x65, 0x77, 0x53, 0x6e, 0x61,
|
|
|
|
0x70, 0x73, 0x68, 0x6f, 0x74, 0x54, 0x6f, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x37, 0x0a,
|
|
|
|
0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28,
|
|
|
|
0x0b, 0x32, 0x15, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x45, 0x76,
|
|
|
|
0x65, 0x6e, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x00, 0x52, 0x0a, 0x45, 0x76, 0x65, 0x6e,
|
|
|
|
0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x46, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
|
|
|
0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
|
|
|
|
0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
|
|
|
0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52,
|
|
|
|
0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x40,
|
|
|
|
0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x0b, 0x20,
|
|
|
|
0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
|
2023-01-04 16:07:02 +00:00
|
|
|
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74,
|
2023-02-17 21:14:46 +00:00
|
|
|
0x65, 0x48, 0x00, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
|
|
|
0x12, 0x38, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28,
|
|
|
|
0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x65,
|
|
|
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x48,
|
|
|
|
0x00, 0x52, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x50, 0x61,
|
|
|
|
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x36, 0x0a, 0x0a, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x61,
|
|
|
|
0x74, 0x63, 0x68, 0x12, 0x28, 0x0a, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20,
|
|
|
|
0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e,
|
|
|
|
0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x9c, 0x01,
|
|
|
|
0x0a, 0x13, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x55,
|
|
|
|
0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x02, 0x4f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
|
|
0x0e, 0x32, 0x14, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x43, 0x61,
|
|
|
|
0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4f, 0x70, 0x52, 0x02, 0x4f, 0x70, 0x12, 0x5f, 0x0a, 0x10, 0x43,
|
|
|
|
0x68, 0x65, 0x63, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x18,
|
|
|
|
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72,
|
|
|
|
0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
|
|
|
|
0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x53,
|
|
|
|
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x10, 0x43, 0x68, 0x65, 0x63,
|
|
|
|
0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x22, 0xc4, 0x01, 0x0a,
|
|
|
|
0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x55, 0x70, 0x64, 0x61,
|
|
|
|
0x74, 0x65, 0x12, 0x35, 0x0a, 0x02, 0x4f, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25,
|
|
|
|
0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
|
|
|
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x70, 0x64,
|
|
|
|
0x61, 0x74, 0x65, 0x4f, 0x70, 0x52, 0x02, 0x4f, 0x70, 0x12, 0x54, 0x0a, 0x0b, 0x43, 0x6f, 0x6e,
|
|
|
|
0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32,
|
|
|
|
0x2e, 0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75,
|
|
|
|
0x6c, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
|
|
|
0x67, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74,
|
|
|
|
0x72, 0x79, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22,
|
|
|
|
0x22, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x12, 0x0a, 0x0a, 0x06, 0x55,
|
|
|
|
0x70, 0x73, 0x65, 0x72, 0x74, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
|
|
|
0x65, 0x10, 0x01, 0x22, 0xc3, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c,
|
|
|
|
0x69, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x02, 0x4f, 0x70, 0x18,
|
|
|
|
0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62,
|
|
|
|
0x65, 0x2e, 0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4f, 0x70, 0x52, 0x02, 0x4f, 0x70, 0x12,
|
|
|
|
0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e,
|
|
|
|
0x61, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73,
|
|
|
|
0x65, 0x4d, 0x65, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x68, 0x61,
|
|
|
|
0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2e, 0x69,
|
|
|
|
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x45,
|
|
|
|
0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0e, 0x45,
|
|
|
|
0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x1a, 0x0a,
|
|
|
|
0x08, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
|
|
|
|
0x08, 0x50, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0x90, 0x02, 0x0a, 0x05, 0x54, 0x6f,
|
|
|
|
0x70, 0x69, 0x63, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00,
|
|
|
|
0x12, 0x11, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65, 0x61, 0x6c, 0x74,
|
|
|
|
0x68, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x48, 0x65,
|
|
|
|
0x61, 0x6c, 0x74, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x10, 0x02, 0x12, 0x0e, 0x0a,
|
|
|
|
0x0a, 0x4d, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0x03, 0x12, 0x13, 0x0a,
|
|
|
|
0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x72,
|
|
|
|
0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x67, 0x72, 0x65, 0x73, 0x73, 0x47, 0x61, 0x74,
|
|
|
|
0x65, 0x77, 0x61, 0x79, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
|
|
|
0x65, 0x49, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0x06, 0x12, 0x0f, 0x0a,
|
|
|
|
0x0b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0x07, 0x12, 0x13,
|
|
|
|
0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74,
|
|
|
|
0x73, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61,
|
|
|
|
0x79, 0x10, 0x09, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x43, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x10,
|
|
|
|
0x0a, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x54, 0x54, 0x50, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x10, 0x0b,
|
|
|
|
0x12, 0x15, 0x0a, 0x11, 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66,
|
|
|
|
0x69, 0x63, 0x61, 0x74, 0x65, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x42, 0x6f, 0x75, 0x6e, 0x64,
|
|
|
|
0x41, 0x50, 0x49, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0x0d, 0x2a, 0x29, 0x0a, 0x09,
|
|
|
|
0x43, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x4f, 0x70, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x67,
|
|
|
|
0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x72, 0x65, 0x67,
|
2023-03-20 15:24:29 +00:00
|
|
|
0x69, 0x73, 0x74, 0x65, 0x72, 0x10, 0x01, 0x32, 0x61, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x65,
|
2023-02-17 21:14:46 +00:00
|
|
|
0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
|
2023-03-20 15:24:29 +00:00
|
|
|
0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12,
|
2023-02-17 21:14:46 +00:00
|
|
|
0x1b, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x73,
|
|
|
|
0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x73,
|
2023-03-20 15:24:29 +00:00
|
|
|
0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x22, 0x08,
|
|
|
|
0xe2, 0x86, 0x04, 0x04, 0x08, 0x02, 0x10, 0x09, 0x30, 0x01, 0x42, 0x9a, 0x01, 0x0a, 0x0d, 0x63,
|
|
|
|
0x6f, 0x6d, 0x2e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x42, 0x0e, 0x53, 0x75,
|
|
|
|
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35,
|
|
|
|
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61, 0x73, 0x68, 0x69,
|
|
|
|
0x63, 0x6f, 0x72, 0x70, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
|
|
|
0x6f, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x70, 0x62, 0x73, 0x75, 0x62, 0x73,
|
|
|
|
0x63, 0x72, 0x69, 0x62, 0x65, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x53, 0x75,
|
|
|
|
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0xca, 0x02, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
|
|
|
|
0x69, 0x62, 0x65, 0xe2, 0x02, 0x15, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x5c,
|
|
|
|
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x53, 0x75,
|
|
|
|
0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var (
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_rawDescOnce sync.Once
|
|
|
|
file_private_pbsubscribe_subscribe_proto_rawDescData = file_private_pbsubscribe_subscribe_proto_rawDesc
|
2022-03-30 16:51:56 +00:00
|
|
|
)
|
|
|
|
|
2023-02-17 21:14:46 +00:00
|
|
|
func file_private_pbsubscribe_subscribe_proto_rawDescGZIP() []byte {
|
|
|
|
file_private_pbsubscribe_subscribe_proto_rawDescOnce.Do(func() {
|
|
|
|
file_private_pbsubscribe_subscribe_proto_rawDescData = protoimpl.X.CompressGZIP(file_private_pbsubscribe_subscribe_proto_rawDescData)
|
2022-03-30 16:51:56 +00:00
|
|
|
})
|
2023-02-17 21:14:46 +00:00
|
|
|
return file_private_pbsubscribe_subscribe_proto_rawDescData
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
|
2023-02-17 21:14:46 +00:00
|
|
|
var file_private_pbsubscribe_subscribe_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
|
|
|
|
var file_private_pbsubscribe_subscribe_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
|
|
|
var file_private_pbsubscribe_subscribe_proto_goTypes = []interface{}{
|
2022-03-30 16:51:56 +00:00
|
|
|
(Topic)(0), // 0: subscribe.Topic
|
|
|
|
(CatalogOp)(0), // 1: subscribe.CatalogOp
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
(ConfigEntryUpdate_UpdateOp)(0), // 2: subscribe.ConfigEntryUpdate.UpdateOp
|
|
|
|
(*NamedSubject)(nil), // 3: subscribe.NamedSubject
|
|
|
|
(*SubscribeRequest)(nil), // 4: subscribe.SubscribeRequest
|
|
|
|
(*Event)(nil), // 5: subscribe.Event
|
|
|
|
(*EventBatch)(nil), // 6: subscribe.EventBatch
|
|
|
|
(*ServiceHealthUpdate)(nil), // 7: subscribe.ServiceHealthUpdate
|
|
|
|
(*ConfigEntryUpdate)(nil), // 8: subscribe.ConfigEntryUpdate
|
2022-07-12 10:35:52 +00:00
|
|
|
(*ServiceListUpdate)(nil), // 9: subscribe.ServiceListUpdate
|
|
|
|
(*pbservice.CheckServiceNode)(nil), // 10: hashicorp.consul.internal.service.CheckServiceNode
|
|
|
|
(*pbconfigentry.ConfigEntry)(nil), // 11: hashicorp.consul.internal.configentry.ConfigEntry
|
|
|
|
(*pbcommon.EnterpriseMeta)(nil), // 12: hashicorp.consul.internal.common.EnterpriseMeta
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
var file_private_pbsubscribe_subscribe_proto_depIdxs = []int32{
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
0, // 0: subscribe.SubscribeRequest.Topic:type_name -> subscribe.Topic
|
|
|
|
3, // 1: subscribe.SubscribeRequest.NamedSubject:type_name -> subscribe.NamedSubject
|
|
|
|
6, // 2: subscribe.Event.EventBatch:type_name -> subscribe.EventBatch
|
|
|
|
7, // 3: subscribe.Event.ServiceHealth:type_name -> subscribe.ServiceHealthUpdate
|
|
|
|
8, // 4: subscribe.Event.ConfigEntry:type_name -> subscribe.ConfigEntryUpdate
|
2022-07-12 10:35:52 +00:00
|
|
|
9, // 5: subscribe.Event.Service:type_name -> subscribe.ServiceListUpdate
|
|
|
|
5, // 6: subscribe.EventBatch.Events:type_name -> subscribe.Event
|
|
|
|
1, // 7: subscribe.ServiceHealthUpdate.Op:type_name -> subscribe.CatalogOp
|
|
|
|
10, // 8: subscribe.ServiceHealthUpdate.CheckServiceNode:type_name -> hashicorp.consul.internal.service.CheckServiceNode
|
|
|
|
2, // 9: subscribe.ConfigEntryUpdate.Op:type_name -> subscribe.ConfigEntryUpdate.UpdateOp
|
|
|
|
11, // 10: subscribe.ConfigEntryUpdate.ConfigEntry:type_name -> hashicorp.consul.internal.configentry.ConfigEntry
|
|
|
|
1, // 11: subscribe.ServiceListUpdate.Op:type_name -> subscribe.CatalogOp
|
|
|
|
12, // 12: subscribe.ServiceListUpdate.EnterpriseMeta:type_name -> hashicorp.consul.internal.common.EnterpriseMeta
|
|
|
|
4, // 13: subscribe.StateChangeSubscription.Subscribe:input_type -> subscribe.SubscribeRequest
|
|
|
|
5, // 14: subscribe.StateChangeSubscription.Subscribe:output_type -> subscribe.Event
|
|
|
|
14, // [14:15] is the sub-list for method output_type
|
|
|
|
13, // [13:14] is the sub-list for method input_type
|
|
|
|
13, // [13:13] is the sub-list for extension type_name
|
|
|
|
13, // [13:13] is the sub-list for extension extendee
|
|
|
|
0, // [0:13] is the sub-list for field type_name
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
|
2023-02-17 21:14:46 +00:00
|
|
|
func init() { file_private_pbsubscribe_subscribe_proto_init() }
|
|
|
|
func file_private_pbsubscribe_subscribe_proto_init() {
|
|
|
|
if File_private_pbsubscribe_subscribe_proto != nil {
|
2022-03-30 16:51:56 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
if !protoimpl.UnsafeEnabled {
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
switch v := v.(*NamedSubject); i {
|
2022-03-30 16:51:56 +00:00
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
switch v := v.(*SubscribeRequest); i {
|
2022-03-30 16:51:56 +00:00
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
switch v := v.(*Event); i {
|
2022-03-30 16:51:56 +00:00
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
switch v := v.(*EventBatch); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
2022-03-30 16:51:56 +00:00
|
|
|
switch v := v.(*ServiceHealthUpdate); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
switch v := v.(*ConfigEntryUpdate); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
2022-07-12 10:35:52 +00:00
|
|
|
switch v := v.(*ServiceListUpdate); i {
|
|
|
|
case 0:
|
|
|
|
return &v.state
|
|
|
|
case 1:
|
|
|
|
return &v.sizeCache
|
|
|
|
case 2:
|
|
|
|
return &v.unknownFields
|
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[1].OneofWrappers = []interface{}{
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
(*SubscribeRequest_WildcardSubject)(nil),
|
|
|
|
(*SubscribeRequest_NamedSubject)(nil),
|
|
|
|
}
|
2023-02-17 21:14:46 +00:00
|
|
|
file_private_pbsubscribe_subscribe_proto_msgTypes[2].OneofWrappers = []interface{}{
|
2022-03-30 16:51:56 +00:00
|
|
|
(*Event_EndOfSnapshot)(nil),
|
|
|
|
(*Event_NewSnapshotToFollow)(nil),
|
|
|
|
(*Event_EventBatch)(nil),
|
|
|
|
(*Event_ServiceHealth)(nil),
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
(*Event_ConfigEntry)(nil),
|
2022-07-12 10:35:52 +00:00
|
|
|
(*Event_Service)(nil),
|
2022-03-30 16:51:56 +00:00
|
|
|
}
|
|
|
|
type x struct{}
|
|
|
|
out := protoimpl.TypeBuilder{
|
|
|
|
File: protoimpl.DescBuilder{
|
|
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
2023-02-17 21:14:46 +00:00
|
|
|
RawDescriptor: file_private_pbsubscribe_subscribe_proto_rawDesc,
|
proxycfg: server-local config entry data sources
This is the OSS portion of enterprise PR 2056.
This commit provides server-local implementations of the proxycfg.ConfigEntry
and proxycfg.ConfigEntryList interfaces, that source data from streaming events.
It makes use of the LocalMaterializer type introduced for peering replication,
adding the necessary support for authorization.
It also adds support for "wildcard" subscriptions (within a topic) to the event
publisher, as this is needed to fetch service-resolvers for all services when
configuring mesh gateways.
Currently, events will be emitted for just the ingress-gateway, service-resolver,
and mesh config entry types, as these are the only entries required by proxycfg
— the events will be emitted on topics named IngressGateway, ServiceResolver,
and MeshConfig topics respectively.
Though these events will only be consumed "locally" for now, they can also be
consumed via the gRPC endpoint (confirmed using grpcurl) so using them from
client agents should be a case of swapping the LocalMaterializer for an
RPCMaterializer.
2022-07-01 15:09:47 +00:00
|
|
|
NumEnums: 3,
|
2022-07-12 10:35:52 +00:00
|
|
|
NumMessages: 7,
|
2022-03-30 16:51:56 +00:00
|
|
|
NumExtensions: 0,
|
|
|
|
NumServices: 1,
|
|
|
|
},
|
2023-02-17 21:14:46 +00:00
|
|
|
GoTypes: file_private_pbsubscribe_subscribe_proto_goTypes,
|
|
|
|
DependencyIndexes: file_private_pbsubscribe_subscribe_proto_depIdxs,
|
|
|
|
EnumInfos: file_private_pbsubscribe_subscribe_proto_enumTypes,
|
|
|
|
MessageInfos: file_private_pbsubscribe_subscribe_proto_msgTypes,
|
2022-03-30 16:51:56 +00:00
|
|
|
}.Build()
|
2023-02-17 21:14:46 +00:00
|
|
|
File_private_pbsubscribe_subscribe_proto = out.File
|
|
|
|
file_private_pbsubscribe_subscribe_proto_rawDesc = nil
|
|
|
|
file_private_pbsubscribe_subscribe_proto_goTypes = nil
|
|
|
|
file_private_pbsubscribe_subscribe_proto_depIdxs = nil
|
2020-07-23 00:25:48 +00:00
|
|
|
}
|