mirror of https://github.com/hashicorp/consul
1868 lines
48 KiB
Go
1868 lines
48 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: proto/pbsubscribe/subscribe.proto
|
|
|
|
package pbsubscribe
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/golang/protobuf/proto"
|
|
pbservice "github.com/hashicorp/consul/proto/pbservice"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
io "io"
|
|
math "math"
|
|
math_bits "math/bits"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
// 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
|
|
)
|
|
|
|
var Topic_name = map[int32]string{
|
|
0: "Unknown",
|
|
1: "ServiceHealth",
|
|
2: "ServiceHealthConnect",
|
|
}
|
|
|
|
var Topic_value = map[string]int32{
|
|
"Unknown": 0,
|
|
"ServiceHealth": 1,
|
|
"ServiceHealthConnect": 2,
|
|
}
|
|
|
|
func (x Topic) String() string {
|
|
return proto.EnumName(Topic_name, int32(x))
|
|
}
|
|
|
|
func (Topic) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_ab3eb8c810e315fb, []int{0}
|
|
}
|
|
|
|
type CatalogOp int32
|
|
|
|
const (
|
|
CatalogOp_Register CatalogOp = 0
|
|
CatalogOp_Deregister CatalogOp = 1
|
|
)
|
|
|
|
var CatalogOp_name = map[int32]string{
|
|
0: "Register",
|
|
1: "Deregister",
|
|
}
|
|
|
|
var CatalogOp_value = map[string]int32{
|
|
"Register": 0,
|
|
"Deregister": 1,
|
|
}
|
|
|
|
func (x CatalogOp) String() string {
|
|
return proto.EnumName(CatalogOp_name, int32(x))
|
|
}
|
|
|
|
func (CatalogOp) EnumDescriptor() ([]byte, []int) {
|
|
return fileDescriptor_ab3eb8c810e315fb, []int{1}
|
|
}
|
|
|
|
// SubscribeRequest used to subscribe to a topic.
|
|
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"`
|
|
// 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. An empty key indicates that all events in the topic
|
|
// are of interest.
|
|
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"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} }
|
|
func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*SubscribeRequest) ProtoMessage() {}
|
|
func (*SubscribeRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ab3eb8c810e315fb, []int{0}
|
|
}
|
|
func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_SubscribeRequest.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *SubscribeRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SubscribeRequest.Merge(m, src)
|
|
}
|
|
func (m *SubscribeRequest) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *SubscribeRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SubscribeRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SubscribeRequest proto.InternalMessageInfo
|
|
|
|
func (m *SubscribeRequest) GetTopic() Topic {
|
|
if m != nil {
|
|
return m.Topic
|
|
}
|
|
return Topic_Unknown
|
|
}
|
|
|
|
func (m *SubscribeRequest) GetKey() string {
|
|
if m != nil {
|
|
return m.Key
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SubscribeRequest) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SubscribeRequest) GetIndex() uint64 {
|
|
if m != nil {
|
|
return m.Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SubscribeRequest) GetDatacenter() string {
|
|
if m != nil {
|
|
return m.Datacenter
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// 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 {
|
|
// Topic the event was published to
|
|
Topic Topic `protobuf:"varint,1,opt,name=Topic,proto3,enum=subscribe.Topic" json:"Topic,omitempty"`
|
|
// Key is the logical identifier for the entity that was mutated.
|
|
Key string `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"`
|
|
// 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,3,opt,name=Index,proto3" json:"Index,omitempty"`
|
|
// Payload is the actual event content.
|
|
//
|
|
// Types that are valid to be assigned to Payload:
|
|
// *Event_EndOfSnapshot
|
|
// *Event_EndOfEmptySnapshot
|
|
// *Event_EventBatch
|
|
// *Event_ServiceHealth
|
|
Payload isEvent_Payload `protobuf_oneof:"Payload"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *Event) Reset() { *m = Event{} }
|
|
func (m *Event) String() string { return proto.CompactTextString(m) }
|
|
func (*Event) ProtoMessage() {}
|
|
func (*Event) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ab3eb8c810e315fb, []int{1}
|
|
}
|
|
func (m *Event) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_Event.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *Event) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_Event.Merge(m, src)
|
|
}
|
|
func (m *Event) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *Event) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_Event.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_Event proto.InternalMessageInfo
|
|
|
|
type isEvent_Payload interface {
|
|
isEvent_Payload()
|
|
MarshalTo([]byte) (int, error)
|
|
Size() int
|
|
}
|
|
|
|
type Event_EndOfSnapshot struct {
|
|
EndOfSnapshot bool `protobuf:"varint,5,opt,name=EndOfSnapshot,proto3,oneof"`
|
|
}
|
|
type Event_EndOfEmptySnapshot struct {
|
|
EndOfEmptySnapshot bool `protobuf:"varint,6,opt,name=EndOfEmptySnapshot,proto3,oneof"`
|
|
}
|
|
type Event_EventBatch struct {
|
|
EventBatch *EventBatch `protobuf:"bytes,7,opt,name=EventBatch,proto3,oneof"`
|
|
}
|
|
type Event_ServiceHealth struct {
|
|
ServiceHealth *ServiceHealthUpdate `protobuf:"bytes,10,opt,name=ServiceHealth,proto3,oneof"`
|
|
}
|
|
|
|
func (*Event_EndOfSnapshot) isEvent_Payload() {}
|
|
func (*Event_EndOfEmptySnapshot) isEvent_Payload() {}
|
|
func (*Event_EventBatch) isEvent_Payload() {}
|
|
func (*Event_ServiceHealth) isEvent_Payload() {}
|
|
|
|
func (m *Event) GetPayload() isEvent_Payload {
|
|
if m != nil {
|
|
return m.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Event) GetTopic() Topic {
|
|
if m != nil {
|
|
return m.Topic
|
|
}
|
|
return Topic_Unknown
|
|
}
|
|
|
|
func (m *Event) GetKey() string {
|
|
if m != nil {
|
|
return m.Key
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Event) GetIndex() uint64 {
|
|
if m != nil {
|
|
return m.Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *Event) GetEndOfSnapshot() bool {
|
|
if x, ok := m.GetPayload().(*Event_EndOfSnapshot); ok {
|
|
return x.EndOfSnapshot
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Event) GetEndOfEmptySnapshot() bool {
|
|
if x, ok := m.GetPayload().(*Event_EndOfEmptySnapshot); ok {
|
|
return x.EndOfEmptySnapshot
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *Event) GetEventBatch() *EventBatch {
|
|
if x, ok := m.GetPayload().(*Event_EventBatch); ok {
|
|
return x.EventBatch
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *Event) GetServiceHealth() *ServiceHealthUpdate {
|
|
if x, ok := m.GetPayload().(*Event_ServiceHealth); ok {
|
|
return x.ServiceHealth
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
|
func (*Event) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
|
return _Event_OneofMarshaler, _Event_OneofUnmarshaler, _Event_OneofSizer, []interface{}{
|
|
(*Event_EndOfSnapshot)(nil),
|
|
(*Event_EndOfEmptySnapshot)(nil),
|
|
(*Event_EventBatch)(nil),
|
|
(*Event_ServiceHealth)(nil),
|
|
}
|
|
}
|
|
|
|
func _Event_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
|
|
m := msg.(*Event)
|
|
// Payload
|
|
switch x := m.Payload.(type) {
|
|
case *Event_EndOfSnapshot:
|
|
t := uint64(0)
|
|
if x.EndOfSnapshot {
|
|
t = 1
|
|
}
|
|
_ = b.EncodeVarint(5<<3 | proto.WireVarint)
|
|
_ = b.EncodeVarint(t)
|
|
case *Event_EndOfEmptySnapshot:
|
|
t := uint64(0)
|
|
if x.EndOfEmptySnapshot {
|
|
t = 1
|
|
}
|
|
_ = b.EncodeVarint(6<<3 | proto.WireVarint)
|
|
_ = b.EncodeVarint(t)
|
|
case *Event_EventBatch:
|
|
_ = b.EncodeVarint(7<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.EventBatch); err != nil {
|
|
return err
|
|
}
|
|
case *Event_ServiceHealth:
|
|
_ = b.EncodeVarint(10<<3 | proto.WireBytes)
|
|
if err := b.EncodeMessage(x.ServiceHealth); err != nil {
|
|
return err
|
|
}
|
|
case nil:
|
|
default:
|
|
return fmt.Errorf("Event.Payload has unexpected type %T", x)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func _Event_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
|
|
m := msg.(*Event)
|
|
switch tag {
|
|
case 5: // Payload.EndOfSnapshot
|
|
if wire != proto.WireVarint {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeVarint()
|
|
m.Payload = &Event_EndOfSnapshot{x != 0}
|
|
return true, err
|
|
case 6: // Payload.EndOfEmptySnapshot
|
|
if wire != proto.WireVarint {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
x, err := b.DecodeVarint()
|
|
m.Payload = &Event_EndOfEmptySnapshot{x != 0}
|
|
return true, err
|
|
case 7: // Payload.EventBatch
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(EventBatch)
|
|
err := b.DecodeMessage(msg)
|
|
m.Payload = &Event_EventBatch{msg}
|
|
return true, err
|
|
case 10: // Payload.ServiceHealth
|
|
if wire != proto.WireBytes {
|
|
return true, proto.ErrInternalBadWireType
|
|
}
|
|
msg := new(ServiceHealthUpdate)
|
|
err := b.DecodeMessage(msg)
|
|
m.Payload = &Event_ServiceHealth{msg}
|
|
return true, err
|
|
default:
|
|
return false, nil
|
|
}
|
|
}
|
|
|
|
func _Event_OneofSizer(msg proto.Message) (n int) {
|
|
m := msg.(*Event)
|
|
// Payload
|
|
switch x := m.Payload.(type) {
|
|
case *Event_EndOfSnapshot:
|
|
n += 1 // tag and wire
|
|
n += 1
|
|
case *Event_EndOfEmptySnapshot:
|
|
n += 1 // tag and wire
|
|
n += 1
|
|
case *Event_EventBatch:
|
|
s := proto.Size(x.EventBatch)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case *Event_ServiceHealth:
|
|
s := proto.Size(x.ServiceHealth)
|
|
n += 1 // tag and wire
|
|
n += proto.SizeVarint(uint64(s))
|
|
n += s
|
|
case nil:
|
|
default:
|
|
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
|
|
}
|
|
return n
|
|
}
|
|
|
|
type EventBatch struct {
|
|
Events []*Event `protobuf:"bytes,1,rep,name=Events,proto3" json:"Events,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *EventBatch) Reset() { *m = EventBatch{} }
|
|
func (m *EventBatch) String() string { return proto.CompactTextString(m) }
|
|
func (*EventBatch) ProtoMessage() {}
|
|
func (*EventBatch) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ab3eb8c810e315fb, []int{2}
|
|
}
|
|
func (m *EventBatch) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *EventBatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_EventBatch.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *EventBatch) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_EventBatch.Merge(m, src)
|
|
}
|
|
func (m *EventBatch) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *EventBatch) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_EventBatch.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_EventBatch proto.InternalMessageInfo
|
|
|
|
func (m *EventBatch) GetEvents() []*Event {
|
|
if m != nil {
|
|
return m.Events
|
|
}
|
|
return nil
|
|
}
|
|
|
|
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"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ServiceHealthUpdate) Reset() { *m = ServiceHealthUpdate{} }
|
|
func (m *ServiceHealthUpdate) String() string { return proto.CompactTextString(m) }
|
|
func (*ServiceHealthUpdate) ProtoMessage() {}
|
|
func (*ServiceHealthUpdate) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ab3eb8c810e315fb, []int{3}
|
|
}
|
|
func (m *ServiceHealthUpdate) XXX_Unmarshal(b []byte) error {
|
|
return m.Unmarshal(b)
|
|
}
|
|
func (m *ServiceHealthUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
if deterministic {
|
|
return xxx_messageInfo_ServiceHealthUpdate.Marshal(b, m, deterministic)
|
|
} else {
|
|
b = b[:cap(b)]
|
|
n, err := m.MarshalToSizedBuffer(b)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return b[:n], nil
|
|
}
|
|
}
|
|
func (m *ServiceHealthUpdate) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ServiceHealthUpdate.Merge(m, src)
|
|
}
|
|
func (m *ServiceHealthUpdate) XXX_Size() int {
|
|
return m.Size()
|
|
}
|
|
func (m *ServiceHealthUpdate) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ServiceHealthUpdate.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ServiceHealthUpdate proto.InternalMessageInfo
|
|
|
|
func (m *ServiceHealthUpdate) GetOp() CatalogOp {
|
|
if m != nil {
|
|
return m.Op
|
|
}
|
|
return CatalogOp_Register
|
|
}
|
|
|
|
func (m *ServiceHealthUpdate) GetCheckServiceNode() *pbservice.CheckServiceNode {
|
|
if m != nil {
|
|
return m.CheckServiceNode
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterEnum("subscribe.Topic", Topic_name, Topic_value)
|
|
proto.RegisterEnum("subscribe.CatalogOp", CatalogOp_name, CatalogOp_value)
|
|
proto.RegisterType((*SubscribeRequest)(nil), "subscribe.SubscribeRequest")
|
|
proto.RegisterType((*Event)(nil), "subscribe.Event")
|
|
proto.RegisterType((*EventBatch)(nil), "subscribe.EventBatch")
|
|
proto.RegisterType((*ServiceHealthUpdate)(nil), "subscribe.ServiceHealthUpdate")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("proto/pbsubscribe/subscribe.proto", fileDescriptor_ab3eb8c810e315fb) }
|
|
|
|
var fileDescriptor_ab3eb8c810e315fb = []byte{
|
|
// 521 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0x8f, 0xd2, 0x40,
|
|
0x14, 0xef, 0xc0, 0x02, 0xcb, 0xc3, 0xdd, 0xd4, 0x11, 0x63, 0xc3, 0x26, 0x0d, 0x12, 0xb3, 0xa9,
|
|
0x9b, 0x48, 0x37, 0x98, 0xe8, 0x4d, 0x23, 0x2c, 0x8a, 0x31, 0x11, 0x53, 0xdc, 0x83, 0xde, 0x86,
|
|
0xf6, 0x49, 0x1b, 0xd8, 0x99, 0xb1, 0x1d, 0x56, 0xb9, 0xfb, 0x21, 0xf6, 0xcb, 0x78, 0xf7, 0xe8,
|
|
0x47, 0x30, 0xf8, 0x45, 0x0c, 0x43, 0xb7, 0x5b, 0x60, 0x6f, 0xde, 0xfa, 0x7e, 0x7f, 0xe6, 0xfd,
|
|
0xf2, 0x5e, 0x1f, 0x3c, 0x94, 0xb1, 0x50, 0xc2, 0x95, 0xe3, 0x64, 0x3e, 0x4e, 0xfc, 0x38, 0x1a,
|
|
0xa3, 0x9b, 0x7d, 0xb5, 0x35, 0x47, 0xab, 0x19, 0xd0, 0x68, 0x64, 0x6a, 0x8c, 0x2f, 0x23, 0x1f,
|
|
0x5d, 0x2e, 0x82, 0x54, 0xd6, 0xba, 0x22, 0x60, 0x8e, 0xae, 0x95, 0x1e, 0x7e, 0x9d, 0x63, 0xa2,
|
|
0xe8, 0x31, 0x94, 0x3e, 0x0a, 0x19, 0xf9, 0x16, 0x69, 0x12, 0xe7, 0xb0, 0x63, 0xb6, 0x6f, 0x1e,
|
|
0xd7, 0xb8, 0xb7, 0xa6, 0xa9, 0x09, 0xc5, 0x77, 0xb8, 0xb0, 0x0a, 0x4d, 0xe2, 0x54, 0xbd, 0xd5,
|
|
0x27, 0xad, 0xaf, 0x9c, 0x53, 0xe4, 0x56, 0x51, 0x63, 0xeb, 0x62, 0x85, 0xbe, 0xe5, 0x01, 0x7e,
|
|
0xb7, 0xf6, 0x9a, 0xc4, 0xd9, 0xf3, 0xd6, 0x05, 0xb5, 0x01, 0xce, 0x98, 0x62, 0x3e, 0x72, 0x85,
|
|
0xb1, 0x55, 0xd2, 0x86, 0x1c, 0xd2, 0xfa, 0x59, 0x80, 0x52, 0xff, 0x12, 0xf9, 0x7f, 0xe6, 0x59,
|
|
0x77, 0x2e, 0xe6, 0x3b, 0x1f, 0xc3, 0x41, 0x9f, 0x07, 0xc3, 0x2f, 0x23, 0xce, 0x64, 0x12, 0x0a,
|
|
0xa5, 0x9b, 0xef, 0x0f, 0x0c, 0x6f, 0x13, 0xa6, 0xa7, 0x40, 0x35, 0xd0, 0xbf, 0x90, 0x6a, 0x91,
|
|
0x89, 0xcb, 0xa9, 0xf8, 0x16, 0x8e, 0x3e, 0x07, 0xd0, 0x91, 0xbb, 0x4c, 0xf9, 0xa1, 0x55, 0x69,
|
|
0x12, 0xa7, 0xd6, 0xb9, 0x9f, 0x8b, 0x7b, 0x43, 0x0e, 0x0c, 0x2f, 0x27, 0xa5, 0xaf, 0xe1, 0x60,
|
|
0xb4, 0xde, 0xce, 0x00, 0xd9, 0x4c, 0x85, 0x16, 0x68, 0xaf, 0x9d, 0xf3, 0x6e, 0xf0, 0xe7, 0x32,
|
|
0x60, 0x0a, 0x57, 0x91, 0x37, 0xe0, 0x6e, 0x15, 0x2a, 0x1f, 0xd8, 0x62, 0x26, 0x58, 0xd0, 0x7a,
|
|
0x96, 0xcf, 0x42, 0x1d, 0x28, 0xeb, 0x2a, 0xb1, 0x48, 0xb3, 0xe8, 0xd4, 0x36, 0x86, 0xa8, 0x09,
|
|
0x2f, 0xe5, 0x5b, 0x3f, 0x08, 0xdc, 0xbb, 0xa5, 0x17, 0x7d, 0x04, 0x85, 0xa1, 0x4c, 0x57, 0x50,
|
|
0xcf, 0xb9, 0x7b, 0x4c, 0xb1, 0x99, 0x98, 0x0c, 0xa5, 0x57, 0x18, 0x4a, 0xfa, 0x06, 0xcc, 0x5e,
|
|
0x88, 0xfe, 0x34, 0x7d, 0xe1, 0xbd, 0x08, 0x50, 0x2f, 0xa4, 0xd6, 0x39, 0x6a, 0x67, 0x7f, 0x60,
|
|
0x7b, 0x5b, 0xe2, 0xed, 0x98, 0x4e, 0x5e, 0xa5, 0x4b, 0xa7, 0x35, 0xa8, 0x9c, 0xf3, 0x29, 0x17,
|
|
0xdf, 0xb8, 0x69, 0xd0, 0xbb, 0x5b, 0x73, 0x32, 0x09, 0xb5, 0xa0, 0xbe, 0x01, 0xf5, 0x04, 0xe7,
|
|
0xe8, 0x2b, 0xb3, 0x70, 0xf2, 0x18, 0xaa, 0x59, 0x38, 0x7a, 0x07, 0xf6, 0x3d, 0x9c, 0x44, 0x89,
|
|
0xc2, 0xd8, 0x34, 0xe8, 0x21, 0xc0, 0x19, 0xc6, 0xd7, 0x35, 0xe9, 0x7c, 0x82, 0x07, 0x23, 0xc5,
|
|
0x14, 0xf6, 0x42, 0xc6, 0x27, 0x98, 0x5e, 0x84, 0x54, 0x91, 0xe0, 0xf4, 0x05, 0x54, 0xb3, 0x0b,
|
|
0xa1, 0x47, 0xf9, 0x85, 0x6c, 0xdd, 0x4d, 0x63, 0x67, 0xa6, 0x2d, 0xe3, 0x94, 0x74, 0x5f, 0xfe,
|
|
0x5a, 0xda, 0xe4, 0xf7, 0xd2, 0x26, 0x7f, 0x96, 0x36, 0xb9, 0xfa, 0x6b, 0x1b, 0x9f, 0x9f, 0x4c,
|
|
0x22, 0x15, 0xce, 0xc7, 0x6d, 0x5f, 0x5c, 0xb8, 0x21, 0x4b, 0xc2, 0xc8, 0x17, 0xb1, 0x74, 0x7d,
|
|
0xc1, 0x93, 0xf9, 0xcc, 0xdd, 0x39, 0xed, 0x71, 0x59, 0x43, 0x4f, 0xff, 0x05, 0x00, 0x00, 0xff,
|
|
0xff, 0x7d, 0xf7, 0xca, 0x01, 0xf6, 0x03, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// StateChangeSubscriptionClient is the client API for StateChangeSubscription service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type StateChangeSubscriptionClient interface {
|
|
// Subscribe to a topic to receive events when there are changes to the topic.
|
|
// TODO: document how to handle framing events
|
|
//
|
|
//
|
|
// Subscribe may return an ABORTED status error to indicate the client must
|
|
// re-start the Subscribe call.
|
|
// This error is used when the server can no longer correctly maintain the
|
|
// stream, for example because the ACL permissions for the token changed
|
|
// and the server doesn't know which previously delivered events should
|
|
// now not be visible. Clients when receiving this must reset their
|
|
// local copy of the state to empty and start over from index 0 to get a
|
|
// valid snapshot again. Servers may also send this if their state store
|
|
// is restored from a snapshot.
|
|
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (StateChangeSubscription_SubscribeClient, error)
|
|
}
|
|
|
|
type stateChangeSubscriptionClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewStateChangeSubscriptionClient(cc *grpc.ClientConn) StateChangeSubscriptionClient {
|
|
return &stateChangeSubscriptionClient{cc}
|
|
}
|
|
|
|
func (c *stateChangeSubscriptionClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (StateChangeSubscription_SubscribeClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_StateChangeSubscription_serviceDesc.Streams[0], "/subscribe.StateChangeSubscription/Subscribe", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &stateChangeSubscriptionSubscribeClient{stream}
|
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
return x, nil
|
|
}
|
|
|
|
type StateChangeSubscription_SubscribeClient interface {
|
|
Recv() (*Event, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type stateChangeSubscriptionSubscribeClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *stateChangeSubscriptionSubscribeClient) Recv() (*Event, error) {
|
|
m := new(Event)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// StateChangeSubscriptionServer is the server API for StateChangeSubscription service.
|
|
type StateChangeSubscriptionServer interface {
|
|
// Subscribe to a topic to receive events when there are changes to the topic.
|
|
// TODO: document how to handle framing events
|
|
//
|
|
//
|
|
// Subscribe may return an ABORTED status error to indicate the client must
|
|
// re-start the Subscribe call.
|
|
// This error is used when the server can no longer correctly maintain the
|
|
// stream, for example because the ACL permissions for the token changed
|
|
// and the server doesn't know which previously delivered events should
|
|
// now not be visible. Clients when receiving this must reset their
|
|
// local copy of the state to empty and start over from index 0 to get a
|
|
// valid snapshot again. Servers may also send this if their state store
|
|
// is restored from a snapshot.
|
|
Subscribe(*SubscribeRequest, StateChangeSubscription_SubscribeServer) error
|
|
}
|
|
|
|
// UnimplementedStateChangeSubscriptionServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedStateChangeSubscriptionServer struct {
|
|
}
|
|
|
|
func (*UnimplementedStateChangeSubscriptionServer) Subscribe(req *SubscribeRequest, srv StateChangeSubscription_SubscribeServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
|
|
}
|
|
|
|
func RegisterStateChangeSubscriptionServer(s *grpc.Server, srv StateChangeSubscriptionServer) {
|
|
s.RegisterService(&_StateChangeSubscription_serviceDesc, srv)
|
|
}
|
|
|
|
func _StateChangeSubscription_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(SubscribeRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(StateChangeSubscriptionServer).Subscribe(m, &stateChangeSubscriptionSubscribeServer{stream})
|
|
}
|
|
|
|
type StateChangeSubscription_SubscribeServer interface {
|
|
Send(*Event) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type stateChangeSubscriptionSubscribeServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *stateChangeSubscriptionSubscribeServer) Send(m *Event) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
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: "proto/pbsubscribe/subscribe.proto",
|
|
}
|
|
|
|
func (m *SubscribeRequest) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *SubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Datacenter) > 0 {
|
|
i -= len(m.Datacenter)
|
|
copy(dAtA[i:], m.Datacenter)
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(len(m.Datacenter)))
|
|
i--
|
|
dAtA[i] = 0x2a
|
|
}
|
|
if m.Index != 0 {
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(m.Index))
|
|
i--
|
|
dAtA[i] = 0x20
|
|
}
|
|
if len(m.Token) > 0 {
|
|
i -= len(m.Token)
|
|
copy(dAtA[i:], m.Token)
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(len(m.Token)))
|
|
i--
|
|
dAtA[i] = 0x1a
|
|
}
|
|
if len(m.Key) > 0 {
|
|
i -= len(m.Key)
|
|
copy(dAtA[i:], m.Key)
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(len(m.Key)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Topic != 0 {
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(m.Topic))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Event) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *Event) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.Payload != nil {
|
|
{
|
|
size := m.Payload.Size()
|
|
i -= size
|
|
if _, err := m.Payload.MarshalTo(dAtA[i:]); err != nil {
|
|
return 0, err
|
|
}
|
|
}
|
|
}
|
|
if m.Index != 0 {
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(m.Index))
|
|
i--
|
|
dAtA[i] = 0x18
|
|
}
|
|
if len(m.Key) > 0 {
|
|
i -= len(m.Key)
|
|
copy(dAtA[i:], m.Key)
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(len(m.Key)))
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Topic != 0 {
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(m.Topic))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *Event_EndOfSnapshot) MarshalTo(dAtA []byte) (int, error) {
|
|
return m.MarshalToSizedBuffer(dAtA[:m.Size()])
|
|
}
|
|
|
|
func (m *Event_EndOfSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
i--
|
|
if m.EndOfSnapshot {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x28
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *Event_EndOfEmptySnapshot) MarshalTo(dAtA []byte) (int, error) {
|
|
return m.MarshalToSizedBuffer(dAtA[:m.Size()])
|
|
}
|
|
|
|
func (m *Event_EndOfEmptySnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
i--
|
|
if m.EndOfEmptySnapshot {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i--
|
|
dAtA[i] = 0x30
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *Event_EventBatch) MarshalTo(dAtA []byte) (int, error) {
|
|
return m.MarshalToSizedBuffer(dAtA[:m.Size()])
|
|
}
|
|
|
|
func (m *Event_EventBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
if m.EventBatch != nil {
|
|
{
|
|
size, err := m.EventBatch.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x3a
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *Event_ServiceHealth) MarshalTo(dAtA []byte) (int, error) {
|
|
return m.MarshalToSizedBuffer(dAtA[:m.Size()])
|
|
}
|
|
|
|
func (m *Event_ServiceHealth) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
if m.ServiceHealth != nil {
|
|
{
|
|
size, err := m.ServiceHealth.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x52
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
func (m *EventBatch) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *EventBatch) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *EventBatch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if len(m.Events) > 0 {
|
|
for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- {
|
|
{
|
|
size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0xa
|
|
}
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func (m *ServiceHealthUpdate) Marshal() (dAtA []byte, err error) {
|
|
size := m.Size()
|
|
dAtA = make([]byte, size)
|
|
n, err := m.MarshalToSizedBuffer(dAtA[:size])
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return dAtA[:n], nil
|
|
}
|
|
|
|
func (m *ServiceHealthUpdate) MarshalTo(dAtA []byte) (int, error) {
|
|
size := m.Size()
|
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
|
}
|
|
|
|
func (m *ServiceHealthUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|
i := len(dAtA)
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.XXX_unrecognized != nil {
|
|
i -= len(m.XXX_unrecognized)
|
|
copy(dAtA[i:], m.XXX_unrecognized)
|
|
}
|
|
if m.CheckServiceNode != nil {
|
|
{
|
|
size, err := m.CheckServiceNode.MarshalToSizedBuffer(dAtA[:i])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
i -= size
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(size))
|
|
}
|
|
i--
|
|
dAtA[i] = 0x12
|
|
}
|
|
if m.Op != 0 {
|
|
i = encodeVarintSubscribe(dAtA, i, uint64(m.Op))
|
|
i--
|
|
dAtA[i] = 0x8
|
|
}
|
|
return len(dAtA) - i, nil
|
|
}
|
|
|
|
func encodeVarintSubscribe(dAtA []byte, offset int, v uint64) int {
|
|
offset -= sovSubscribe(v)
|
|
base := offset
|
|
for v >= 1<<7 {
|
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
|
v >>= 7
|
|
offset++
|
|
}
|
|
dAtA[offset] = uint8(v)
|
|
return base
|
|
}
|
|
func (m *SubscribeRequest) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Topic != 0 {
|
|
n += 1 + sovSubscribe(uint64(m.Topic))
|
|
}
|
|
l = len(m.Key)
|
|
if l > 0 {
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
if m.Index != 0 {
|
|
n += 1 + sovSubscribe(uint64(m.Index))
|
|
}
|
|
l = len(m.Datacenter)
|
|
if l > 0 {
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Event) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Topic != 0 {
|
|
n += 1 + sovSubscribe(uint64(m.Topic))
|
|
}
|
|
l = len(m.Key)
|
|
if l > 0 {
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
if m.Index != 0 {
|
|
n += 1 + sovSubscribe(uint64(m.Index))
|
|
}
|
|
if m.Payload != nil {
|
|
n += m.Payload.Size()
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *Event_EndOfSnapshot) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
n += 2
|
|
return n
|
|
}
|
|
func (m *Event_EndOfEmptySnapshot) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
n += 2
|
|
return n
|
|
}
|
|
func (m *Event_EventBatch) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.EventBatch != nil {
|
|
l = m.EventBatch.Size()
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
func (m *Event_ServiceHealth) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.ServiceHealth != nil {
|
|
l = m.ServiceHealth.Size()
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
func (m *EventBatch) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if len(m.Events) > 0 {
|
|
for _, e := range m.Events {
|
|
l = e.Size()
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *ServiceHealthUpdate) Size() (n int) {
|
|
if m == nil {
|
|
return 0
|
|
}
|
|
var l int
|
|
_ = l
|
|
if m.Op != 0 {
|
|
n += 1 + sovSubscribe(uint64(m.Op))
|
|
}
|
|
if m.CheckServiceNode != nil {
|
|
l = m.CheckServiceNode.Size()
|
|
n += 1 + l + sovSubscribe(uint64(l))
|
|
}
|
|
if m.XXX_unrecognized != nil {
|
|
n += len(m.XXX_unrecognized)
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovSubscribe(x uint64) (n int) {
|
|
return (math_bits.Len64(x|1) + 6) / 7
|
|
}
|
|
func sozSubscribe(x uint64) (n int) {
|
|
return sovSubscribe(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *SubscribeRequest) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: SubscribeRequest: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: SubscribeRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
|
|
}
|
|
m.Topic = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Topic |= Topic(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Key = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 4:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
|
}
|
|
m.Index = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Index |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Datacenter", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Datacenter = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSubscribe(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *Event) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: Event: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Topic", wireType)
|
|
}
|
|
m.Topic = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Topic |= Topic(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
stringLen |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
intStringLen := int(stringLen)
|
|
if intStringLen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Key = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
case 3:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
|
|
}
|
|
m.Index = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Index |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 5:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EndOfSnapshot", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
b := bool(v != 0)
|
|
m.Payload = &Event_EndOfSnapshot{b}
|
|
case 6:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EndOfEmptySnapshot", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
b := bool(v != 0)
|
|
m.Payload = &Event_EndOfEmptySnapshot{b}
|
|
case 7:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field EventBatch", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v := &EventBatch{}
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
m.Payload = &Event_EventBatch{v}
|
|
iNdEx = postIndex
|
|
case 10:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field ServiceHealth", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
v := &ServiceHealthUpdate{}
|
|
if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
m.Payload = &Event_ServiceHealth{v}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSubscribe(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *EventBatch) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: EventBatch: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: EventBatch: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Events = append(m.Events, &Event{})
|
|
if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSubscribe(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *ServiceHealthUpdate) Unmarshal(dAtA []byte) error {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
preIndex := iNdEx
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= uint64(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
fieldNum := int32(wire >> 3)
|
|
wireType := int(wire & 0x7)
|
|
if wireType == 4 {
|
|
return fmt.Errorf("proto: ServiceHealthUpdate: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: ServiceHealthUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType)
|
|
}
|
|
m.Op = 0
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Op |= CatalogOp(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 2:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field CheckServiceNode", wireType)
|
|
}
|
|
var msglen int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
msglen |= int(b&0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if msglen < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
postIndex := iNdEx + msglen
|
|
if postIndex < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
if m.CheckServiceNode == nil {
|
|
m.CheckServiceNode = &pbservice.CheckServiceNode{}
|
|
}
|
|
if err := m.CheckServiceNode.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
return err
|
|
}
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipSubscribe(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) < 0 {
|
|
return ErrInvalidLengthSubscribe
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipSubscribe(dAtA []byte) (n int, err error) {
|
|
l := len(dAtA)
|
|
iNdEx := 0
|
|
for iNdEx < l {
|
|
var wire uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
wire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
wireType := int(wire & 0x7)
|
|
switch wireType {
|
|
case 0:
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx++
|
|
if dAtA[iNdEx-1] < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 1:
|
|
iNdEx += 8
|
|
return iNdEx, nil
|
|
case 2:
|
|
var length int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
length |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
if length < 0 {
|
|
return 0, ErrInvalidLengthSubscribe
|
|
}
|
|
iNdEx += length
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthSubscribe
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowSubscribe
|
|
}
|
|
if iNdEx >= l {
|
|
return 0, io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
innerWire |= (uint64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
innerWireType := int(innerWire & 0x7)
|
|
if innerWireType == 4 {
|
|
break
|
|
}
|
|
next, err := skipSubscribe(dAtA[start:])
|
|
if err != nil {
|
|
return 0, err
|
|
}
|
|
iNdEx = start + next
|
|
if iNdEx < 0 {
|
|
return 0, ErrInvalidLengthSubscribe
|
|
}
|
|
}
|
|
return iNdEx, nil
|
|
case 4:
|
|
return iNdEx, nil
|
|
case 5:
|
|
iNdEx += 4
|
|
return iNdEx, nil
|
|
default:
|
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
|
}
|
|
}
|
|
panic("unreachable")
|
|
}
|
|
|
|
var (
|
|
ErrInvalidLengthSubscribe = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowSubscribe = fmt.Errorf("proto: integer overflow")
|
|
)
|