pbsubscribe

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Topic_name = map[int32]string{
		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",
		14: "IPRateLimit",
		15: "SamenessGroup",
		16: "JWTProvider",
	}
	Topic_value = map[string]int32{
		"Unknown":              0,
		"ServiceHealth":        1,
		"ServiceHealthConnect": 2,
		"MeshConfig":           3,
		"ServiceResolver":      4,
		"IngressGateway":       5,
		"ServiceIntentions":    6,
		"ServiceList":          7,
		"ServiceDefaults":      8,
		"APIGateway":           9,
		"TCPRoute":             10,
		"HTTPRoute":            11,
		"InlineCertificate":    12,
		"BoundAPIGateway":      13,
		"IPRateLimit":          14,
		"SamenessGroup":        15,
		"JWTProvider":          16,
	}
)

Enum value maps for Topic.

View Source
var (
	CatalogOp_name = map[int32]string{
		0: "Register",
		1: "Deregister",
	}
	CatalogOp_value = map[string]int32{
		"Register":   0,
		"Deregister": 1,
	}
)

Enum value maps for CatalogOp.

View Source
var (
	ConfigEntryUpdate_UpdateOp_name = map[int32]string{
		0: "Upsert",
		1: "Delete",
	}
	ConfigEntryUpdate_UpdateOp_value = map[string]int32{
		"Upsert": 0,
		"Delete": 1,
	}
)

Enum value maps for ConfigEntryUpdate_UpdateOp.

View Source
var File_private_pbsubscribe_subscribe_proto protoreflect.FileDescriptor
View Source
var StateChangeSubscription_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "subscribe.StateChangeSubscription",
	HandlerType: (*StateChangeSubscriptionServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _StateChangeSubscription_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "private/pbsubscribe/subscribe.proto",
}

StateChangeSubscription_ServiceDesc is the grpc.ServiceDesc for StateChangeSubscription service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterStateChangeSubscriptionServer

func RegisterStateChangeSubscriptionServer(s grpc.ServiceRegistrar, srv StateChangeSubscriptionServer)

Types

type CatalogOp

type CatalogOp int32
const (
	CatalogOp_Register   CatalogOp = 0
	CatalogOp_Deregister CatalogOp = 1
)

func (CatalogOp) Descriptor

func (CatalogOp) Descriptor() protoreflect.EnumDescriptor

func (CatalogOp) Enum

func (x CatalogOp) Enum() *CatalogOp

func (CatalogOp) EnumDescriptor deprecated

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

Deprecated: Use CatalogOp.Descriptor instead.

func (CatalogOp) Number

func (x CatalogOp) Number() protoreflect.EnumNumber

func (CatalogOp) String

func (x CatalogOp) String() string

func (CatalogOp) Type

type ConfigEntryUpdate

type ConfigEntryUpdate struct {
	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"`
	// contains filtered or unexported fields
}

func (*ConfigEntryUpdate) Descriptor deprecated

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

Deprecated: Use ConfigEntryUpdate.ProtoReflect.Descriptor instead.

func (*ConfigEntryUpdate) GetConfigEntry

func (x *ConfigEntryUpdate) GetConfigEntry() *pbconfigentry.ConfigEntry

func (*ConfigEntryUpdate) GetOp

func (*ConfigEntryUpdate) MarshalBinary

func (msg *ConfigEntryUpdate) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ConfigEntryUpdate) ProtoMessage

func (*ConfigEntryUpdate) ProtoMessage()

func (*ConfigEntryUpdate) ProtoReflect

func (x *ConfigEntryUpdate) ProtoReflect() protoreflect.Message

func (*ConfigEntryUpdate) Reset

func (x *ConfigEntryUpdate) Reset()

func (*ConfigEntryUpdate) String

func (x *ConfigEntryUpdate) String() string

func (*ConfigEntryUpdate) UnmarshalBinary

func (msg *ConfigEntryUpdate) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ConfigEntryUpdate_UpdateOp

type ConfigEntryUpdate_UpdateOp int32
const (
	ConfigEntryUpdate_Upsert ConfigEntryUpdate_UpdateOp = 0
	ConfigEntryUpdate_Delete ConfigEntryUpdate_UpdateOp = 1
)

func (ConfigEntryUpdate_UpdateOp) Descriptor

func (ConfigEntryUpdate_UpdateOp) Enum

func (ConfigEntryUpdate_UpdateOp) EnumDescriptor deprecated

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

Deprecated: Use ConfigEntryUpdate_UpdateOp.Descriptor instead.

func (ConfigEntryUpdate_UpdateOp) Number

func (ConfigEntryUpdate_UpdateOp) String

func (ConfigEntryUpdate_UpdateOp) Type

type Event

type Event struct {

	// 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.
	Index uint64 `protobuf:"varint,1,opt,name=Index,proto3" json:"Index,omitempty"`
	// Payload is the actual event content.
	//
	// Types that are assignable to Payload:
	//
	//	*Event_EndOfSnapshot
	//	*Event_NewSnapshotToFollow
	//	*Event_EventBatch
	//	*Event_ServiceHealth
	//	*Event_ConfigEntry
	//	*Event_Service
	Payload isEvent_Payload `protobuf_oneof:"Payload"`
	// contains filtered or unexported fields
}

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.

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetConfigEntry

func (x *Event) GetConfigEntry() *ConfigEntryUpdate

func (*Event) GetEndOfSnapshot

func (x *Event) GetEndOfSnapshot() bool

func (*Event) GetEventBatch

func (x *Event) GetEventBatch() *EventBatch

func (*Event) GetIndex

func (x *Event) GetIndex() uint64

func (*Event) GetNewSnapshotToFollow

func (x *Event) GetNewSnapshotToFollow() bool

func (*Event) GetPayload

func (m *Event) GetPayload() isEvent_Payload

func (*Event) GetService

func (x *Event) GetService() *ServiceListUpdate

func (*Event) GetServiceHealth

func (x *Event) GetServiceHealth() *ServiceHealthUpdate

func (*Event) MarshalBinary

func (msg *Event) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

func (*Event) UnmarshalBinary

func (msg *Event) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type EventBatch

type EventBatch struct {
	Events []*Event `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"`
	// contains filtered or unexported fields
}

func (*EventBatch) Descriptor deprecated

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

Deprecated: Use EventBatch.ProtoReflect.Descriptor instead.

func (*EventBatch) GetEvents

func (x *EventBatch) GetEvents() []*Event

func (*EventBatch) MarshalBinary

func (msg *EventBatch) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*EventBatch) ProtoMessage

func (*EventBatch) ProtoMessage()

func (*EventBatch) ProtoReflect

func (x *EventBatch) ProtoReflect() protoreflect.Message

func (*EventBatch) Reset

func (x *EventBatch) Reset()

func (*EventBatch) String

func (x *EventBatch) String() string

func (*EventBatch) UnmarshalBinary

func (msg *EventBatch) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type Event_ConfigEntry

type Event_ConfigEntry struct {
	// ConfigEntry is used for config entry topics (e.g. MeshConfig).
	ConfigEntry *ConfigEntryUpdate `protobuf:"bytes,11,opt,name=ConfigEntry,proto3,oneof"`
}

type Event_EndOfSnapshot

type Event_EndOfSnapshot struct {
	// EndOfSnapshot indicates the event stream for the initial snapshot has
	// ended. Subsequent Events delivered will be mutations to that result.
	EndOfSnapshot bool `protobuf:"varint,2,opt,name=EndOfSnapshot,proto3,oneof"`
}

type Event_EventBatch

type Event_EventBatch struct {
	// 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.
	EventBatch *EventBatch `protobuf:"bytes,4,opt,name=EventBatch,proto3,oneof"`
}

type Event_NewSnapshotToFollow

type Event_NewSnapshotToFollow struct {
	// 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.
	NewSnapshotToFollow bool `protobuf:"varint,3,opt,name=NewSnapshotToFollow,proto3,oneof"`
}

type Event_Service

type Event_Service struct {
	// Service is used for ServiceList topic.
	Service *ServiceListUpdate `protobuf:"bytes,12,opt,name=Service,proto3,oneof"`
}

type Event_ServiceHealth

type Event_ServiceHealth struct {
	// ServiceHealth is used for ServiceHealth and ServiceHealthConnect
	// topics.
	ServiceHealth *ServiceHealthUpdate `protobuf:"bytes,10,opt,name=ServiceHealth,proto3,oneof"`
}

type NamedSubject

type NamedSubject struct {

	// Key is a topic-specific identifier that restricts the scope of the
	// subscription to only events pertaining to that identifier. For example,
	// to receive events for a single service, the service's name is specified
	// as the key.
	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"`
	// contains filtered or unexported fields
}

func (*NamedSubject) Descriptor deprecated

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

Deprecated: Use NamedSubject.ProtoReflect.Descriptor instead.

func (*NamedSubject) GetKey

func (x *NamedSubject) GetKey() string

func (*NamedSubject) GetNamespace

func (x *NamedSubject) GetNamespace() string

func (*NamedSubject) GetPartition

func (x *NamedSubject) GetPartition() string

func (*NamedSubject) GetPeerName

func (x *NamedSubject) GetPeerName() string

func (*NamedSubject) MarshalBinary

func (msg *NamedSubject) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*NamedSubject) ProtoMessage

func (*NamedSubject) ProtoMessage()

func (*NamedSubject) ProtoReflect

func (x *NamedSubject) ProtoReflect() protoreflect.Message

func (*NamedSubject) Reset

func (x *NamedSubject) Reset()

func (*NamedSubject) String

func (x *NamedSubject) String() string

func (*NamedSubject) UnmarshalBinary

func (msg *NamedSubject) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ServiceHealthUpdate

type ServiceHealthUpdate struct {
	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"`
	// contains filtered or unexported fields
}

func (*ServiceHealthUpdate) Descriptor deprecated

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

Deprecated: Use ServiceHealthUpdate.ProtoReflect.Descriptor instead.

func (*ServiceHealthUpdate) GetCheckServiceNode

func (x *ServiceHealthUpdate) GetCheckServiceNode() *pbservice.CheckServiceNode

func (*ServiceHealthUpdate) GetOp

func (x *ServiceHealthUpdate) GetOp() CatalogOp

func (*ServiceHealthUpdate) MarshalBinary

func (msg *ServiceHealthUpdate) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceHealthUpdate) ProtoMessage

func (*ServiceHealthUpdate) ProtoMessage()

func (*ServiceHealthUpdate) ProtoReflect

func (x *ServiceHealthUpdate) ProtoReflect() protoreflect.Message

func (*ServiceHealthUpdate) Reset

func (x *ServiceHealthUpdate) Reset()

func (*ServiceHealthUpdate) String

func (x *ServiceHealthUpdate) String() string

func (*ServiceHealthUpdate) UnmarshalBinary

func (msg *ServiceHealthUpdate) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type ServiceListUpdate

type ServiceListUpdate struct {
	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"`
	// contains filtered or unexported fields
}

func (*ServiceListUpdate) Descriptor deprecated

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

Deprecated: Use ServiceListUpdate.ProtoReflect.Descriptor instead.

func (*ServiceListUpdate) GetEnterpriseMeta

func (x *ServiceListUpdate) GetEnterpriseMeta() *pbcommon.EnterpriseMeta

func (*ServiceListUpdate) GetName

func (x *ServiceListUpdate) GetName() string

func (*ServiceListUpdate) GetOp

func (x *ServiceListUpdate) GetOp() CatalogOp

func (*ServiceListUpdate) GetPeerName

func (x *ServiceListUpdate) GetPeerName() string

func (*ServiceListUpdate) MarshalBinary

func (msg *ServiceListUpdate) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*ServiceListUpdate) ProtoMessage

func (*ServiceListUpdate) ProtoMessage()

func (*ServiceListUpdate) ProtoReflect

func (x *ServiceListUpdate) ProtoReflect() protoreflect.Message

func (*ServiceListUpdate) Reset

func (x *ServiceListUpdate) Reset()

func (*ServiceListUpdate) String

func (x *ServiceListUpdate) String() string

func (*ServiceListUpdate) UnmarshalBinary

func (msg *ServiceListUpdate) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type StateChangeSubscriptionClient

type StateChangeSubscriptionClient interface {
	// Subscribe to a topic to receive events when there are changes to the topic.
	//
	// If SubscribeRequest.Index is 0 the event stream will start with one or
	// more snapshot events, followed by an EndOfSnapshot event. Subsequent
	// events will be a live stream of events as they happen.
	//
	// If SubscribeRequest.Index is > 0 it is assumed the client already has a
	// snapshot, and is trying to resume a stream that was disconnected. The
	// client will either receive a NewSnapshotToFollow event, indicating the
	// client view is stale and it must reset its view and prepare for a new
	// snapshot. Or, if no NewSnapshotToFollow event is received, the client
	// view is still fresh, and all events will be the live stream.
	//
	// Subscribe may return a gRPC status error with codes.ABORTED to indicate
	// the client view is now stale due to a change on the server. The client
	// must reset its view and issue a new Subscribe call to restart the stream.
	// This error is used when the server can no longer correctly maintain the
	// stream, for example because the ACL permissions for the token changed, or
	// because the server state was restored from a snapshot.
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (StateChangeSubscription_SubscribeClient, error)
}

StateChangeSubscriptionClient is the client API for StateChangeSubscription service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type StateChangeSubscriptionServer

type StateChangeSubscriptionServer interface {
	// Subscribe to a topic to receive events when there are changes to the topic.
	//
	// If SubscribeRequest.Index is 0 the event stream will start with one or
	// more snapshot events, followed by an EndOfSnapshot event. Subsequent
	// events will be a live stream of events as they happen.
	//
	// If SubscribeRequest.Index is > 0 it is assumed the client already has a
	// snapshot, and is trying to resume a stream that was disconnected. The
	// client will either receive a NewSnapshotToFollow event, indicating the
	// client view is stale and it must reset its view and prepare for a new
	// snapshot. Or, if no NewSnapshotToFollow event is received, the client
	// view is still fresh, and all events will be the live stream.
	//
	// Subscribe may return a gRPC status error with codes.ABORTED to indicate
	// the client view is now stale due to a change on the server. The client
	// must reset its view and issue a new Subscribe call to restart the stream.
	// This error is used when the server can no longer correctly maintain the
	// stream, for example because the ACL permissions for the token changed, or
	// because the server state was restored from a snapshot.
	// buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
	Subscribe(*SubscribeRequest, StateChangeSubscription_SubscribeServer) error
}

StateChangeSubscriptionServer is the server API for StateChangeSubscription service. All implementations should embed UnimplementedStateChangeSubscriptionServer for forward compatibility

type StateChangeSubscription_SubscribeClient

type StateChangeSubscription_SubscribeClient interface {
	Recv() (*Event, error)
	grpc.ClientStream
}

type StateChangeSubscription_SubscribeServer

type StateChangeSubscription_SubscribeServer interface {
	Send(*Event) error
	grpc.ServerStream
}

type SubscribeRequest

type SubscribeRequest struct {

	// 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.
	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.
	Datacenter string `protobuf:"bytes,5,opt,name=Datacenter,proto3" json:"Datacenter,omitempty"`
	// Deprecated: use NamedSubject.Namespace instead.
	Namespace string `protobuf:"bytes,6,opt,name=Namespace,proto3" json:"Namespace,omitempty"`
	// Deprecated: use NamedSubject.Partition instead.
	Partition string `protobuf:"bytes,7,opt,name=Partition,proto3" json:"Partition,omitempty"`
	// Deprecated: use NamedSubject.PeerName instead.
	PeerName string `protobuf:"bytes,8,opt,name=PeerName,proto3" json:"PeerName,omitempty"`
	// 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:
	//
	//	*SubscribeRequest_WildcardSubject
	//	*SubscribeRequest_NamedSubject
	Subject isSubscribeRequest_Subject `protobuf_oneof:"Subject"`
	// contains filtered or unexported fields
}

SubscribeRequest used to subscribe to a topic.

func (*SubscribeRequest) AllowStaleRead

func (req *SubscribeRequest) AllowStaleRead() bool

AllowStaleRead implements structs.RPCInfo

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) EnterpriseMeta

func (req *SubscribeRequest) EnterpriseMeta() acl.EnterpriseMeta

EnterpriseMeta returns the EnterpriseMeta encoded in the request's Subject.

func (*SubscribeRequest) GetDatacenter

func (x *SubscribeRequest) GetDatacenter() string

func (*SubscribeRequest) GetIndex

func (x *SubscribeRequest) GetIndex() uint64

func (*SubscribeRequest) GetKey

func (x *SubscribeRequest) GetKey() string

func (*SubscribeRequest) GetNamedSubject

func (x *SubscribeRequest) GetNamedSubject() *NamedSubject

func (*SubscribeRequest) GetNamespace

func (x *SubscribeRequest) GetNamespace() string

func (*SubscribeRequest) GetPartition

func (x *SubscribeRequest) GetPartition() string

func (*SubscribeRequest) GetPeerName

func (x *SubscribeRequest) GetPeerName() string

func (*SubscribeRequest) GetSubject

func (m *SubscribeRequest) GetSubject() isSubscribeRequest_Subject

func (*SubscribeRequest) GetToken

func (x *SubscribeRequest) GetToken() string

func (*SubscribeRequest) GetTopic

func (x *SubscribeRequest) GetTopic() Topic

func (*SubscribeRequest) GetWildcardSubject

func (x *SubscribeRequest) GetWildcardSubject() bool

func (*SubscribeRequest) HasTimedOut

func (req *SubscribeRequest) HasTimedOut(start time.Time, rpcHoldTimeout, _, _ time.Duration) (bool, error)

HasTimedOut implements structs.RPCInfo

func (*SubscribeRequest) IsRead

func (req *SubscribeRequest) IsRead() bool

IsRead implements structs.RPCInfo

func (*SubscribeRequest) MarshalBinary

func (msg *SubscribeRequest) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

func (x *SubscribeRequest) ProtoReflect() protoreflect.Message

func (*SubscribeRequest) RequestDatacenter

func (req *SubscribeRequest) RequestDatacenter() string

RequestDatacenter implements structs.RPCInfo

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) SetTokenSecret

func (req *SubscribeRequest) SetTokenSecret(token string)

SetTokenSecret implements structs.RPCInfo

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

func (*SubscribeRequest) TokenSecret

func (req *SubscribeRequest) TokenSecret() string

TokenSecret implements structs.RPCInfo

func (*SubscribeRequest) UnmarshalBinary

func (msg *SubscribeRequest) UnmarshalBinary(b []byte) error

UnmarshalBinary implements encoding.BinaryUnmarshaler

type SubscribeRequest_NamedSubject

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"`
}

type SubscribeRequest_WildcardSubject

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 Topic

type Topic int32

Topic enumerates the supported event topics.

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
	// 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
	// IngressGateway topic contains events for changes to an ingress gateway.
	Topic_IngressGateway Topic = 5
	// ServiceIntentions topic contains events for changes to service intentions.
	Topic_ServiceIntentions Topic = 6
	// 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
	// ServiceDefaults topic contains events for changes to service-defaults.
	Topic_ServiceDefaults Topic = 8
	// 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
	// IPRateLimit topic contains events for changes to control-plane-request-limit
	Topic_IPRateLimit Topic = 14
	// SamenessGroup topic contains events for changes to Sameness Groups
	Topic_SamenessGroup Topic = 15
	// JWTProvider topic contains events for changes to jwt-provider
	Topic_JWTProvider Topic = 16
)

func (Topic) Descriptor

func (Topic) Descriptor() protoreflect.EnumDescriptor

func (Topic) Enum

func (x Topic) Enum() *Topic

func (Topic) EnumDescriptor deprecated

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

Deprecated: Use Topic.Descriptor instead.

func (Topic) Number

func (x Topic) Number() protoreflect.EnumNumber

func (Topic) String

func (x Topic) String() string

func (Topic) Type

func (Topic) Type() protoreflect.EnumType

type UnimplementedStateChangeSubscriptionServer

type UnimplementedStateChangeSubscriptionServer struct {
}

UnimplementedStateChangeSubscriptionServer should be embedded to have forward compatible implementations.

func (UnimplementedStateChangeSubscriptionServer) Subscribe

type UnsafeStateChangeSubscriptionServer

type UnsafeStateChangeSubscriptionServer interface {
	// contains filtered or unexported methods
}

UnsafeStateChangeSubscriptionServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to StateChangeSubscriptionServer will result in compilation errors.

Jump to

Keyboard shortcuts

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