|
|
|
@ -1,13 +1,11 @@
|
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
|
// source: micro/go-micro/router/proto/router.proto
|
|
|
|
|
// source: router.proto
|
|
|
|
|
|
|
|
|
|
package go_micro_router
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
context "context"
|
|
|
|
|
fmt "fmt"
|
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
|
math "math"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
@ -45,7 +43,7 @@ func (x AdvertType) String() string {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (AdvertType) EnumDescriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{0}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{0}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// EventType defines the type of event
|
|
|
|
@ -74,7 +72,7 @@ func (x EventType) String() string {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (EventType) EnumDescriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{1}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{1}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Empty request
|
|
|
|
@ -88,7 +86,7 @@ func (m *Request) Reset() { *m = Request{} }
|
|
|
|
|
func (m *Request) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Request) ProtoMessage() {}
|
|
|
|
|
func (*Request) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{0}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{0}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Request) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -109,6 +107,38 @@ func (m *Request) XXX_DiscardUnknown() {
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_Request proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
// Empty response
|
|
|
|
|
type Response struct {
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Response) Reset() { *m = Response{} }
|
|
|
|
|
func (m *Response) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Response) ProtoMessage() {}
|
|
|
|
|
func (*Response) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{1}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Response) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_Response.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_Response.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (m *Response) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_Response.Merge(m, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *Response) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_Response.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *Response) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_Response.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_Response proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
// ListResponse is returned by List
|
|
|
|
|
type ListResponse struct {
|
|
|
|
|
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
|
|
|
|
@ -121,7 +151,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
|
|
|
|
|
func (m *ListResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*ListResponse) ProtoMessage() {}
|
|
|
|
|
func (*ListResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{1}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{2}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *ListResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -161,7 +191,7 @@ func (m *LookupRequest) Reset() { *m = LookupRequest{} }
|
|
|
|
|
func (m *LookupRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*LookupRequest) ProtoMessage() {}
|
|
|
|
|
func (*LookupRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{2}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{3}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *LookupRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -201,7 +231,7 @@ func (m *LookupResponse) Reset() { *m = LookupResponse{} }
|
|
|
|
|
func (m *LookupResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*LookupResponse) ProtoMessage() {}
|
|
|
|
|
func (*LookupResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{3}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{4}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *LookupResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -229,6 +259,7 @@ func (m *LookupResponse) GetRoutes() []*Route {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryRequest queries Table for Routes
|
|
|
|
|
type QueryRequest struct {
|
|
|
|
|
Query *Query `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
@ -240,7 +271,7 @@ func (m *QueryRequest) Reset() { *m = QueryRequest{} }
|
|
|
|
|
func (m *QueryRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*QueryRequest) ProtoMessage() {}
|
|
|
|
|
func (*QueryRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{4}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{5}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *QueryRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -268,6 +299,7 @@ func (m *QueryRequest) GetQuery() *Query {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// QueryResponse is returned by Query
|
|
|
|
|
type QueryResponse struct {
|
|
|
|
|
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
@ -279,7 +311,7 @@ func (m *QueryResponse) Reset() { *m = QueryResponse{} }
|
|
|
|
|
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*QueryResponse) ProtoMessage() {}
|
|
|
|
|
func (*QueryResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{5}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{6}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -318,7 +350,7 @@ func (m *WatchRequest) Reset() { *m = WatchRequest{} }
|
|
|
|
|
func (m *WatchRequest) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*WatchRequest) ProtoMessage() {}
|
|
|
|
|
func (*WatchRequest) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{6}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{7}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *WatchRequest) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -360,7 +392,7 @@ func (m *Advert) Reset() { *m = Advert{} }
|
|
|
|
|
func (m *Advert) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Advert) ProtoMessage() {}
|
|
|
|
|
func (*Advert) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{7}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{8}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Advert) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -416,6 +448,47 @@ func (m *Advert) GetEvents() []*Event {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Solicit solicits routes
|
|
|
|
|
type Solicit struct {
|
|
|
|
|
// id of the soliciting router
|
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Solicit) Reset() { *m = Solicit{} }
|
|
|
|
|
func (m *Solicit) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Solicit) ProtoMessage() {}
|
|
|
|
|
func (*Solicit) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{9}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Solicit) XXX_Unmarshal(b []byte) error {
|
|
|
|
|
return xxx_messageInfo_Solicit.Unmarshal(m, b)
|
|
|
|
|
}
|
|
|
|
|
func (m *Solicit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
|
return xxx_messageInfo_Solicit.Marshal(b, m, deterministic)
|
|
|
|
|
}
|
|
|
|
|
func (m *Solicit) XXX_Merge(src proto.Message) {
|
|
|
|
|
xxx_messageInfo_Solicit.Merge(m, src)
|
|
|
|
|
}
|
|
|
|
|
func (m *Solicit) XXX_Size() int {
|
|
|
|
|
return xxx_messageInfo_Solicit.Size(m)
|
|
|
|
|
}
|
|
|
|
|
func (m *Solicit) XXX_DiscardUnknown() {
|
|
|
|
|
xxx_messageInfo_Solicit.DiscardUnknown(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var xxx_messageInfo_Solicit proto.InternalMessageInfo
|
|
|
|
|
|
|
|
|
|
func (m *Solicit) GetId() string {
|
|
|
|
|
if m != nil {
|
|
|
|
|
return m.Id
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ProcessResponse is returned by Process
|
|
|
|
|
type ProcessResponse struct {
|
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
@ -427,7 +500,7 @@ func (m *ProcessResponse) Reset() { *m = ProcessResponse{} }
|
|
|
|
|
func (m *ProcessResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*ProcessResponse) ProtoMessage() {}
|
|
|
|
|
func (*ProcessResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{8}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{10}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *ProcessResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -459,7 +532,7 @@ func (m *CreateResponse) Reset() { *m = CreateResponse{} }
|
|
|
|
|
func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*CreateResponse) ProtoMessage() {}
|
|
|
|
|
func (*CreateResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{9}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{11}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -491,7 +564,7 @@ func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
|
|
|
|
|
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*DeleteResponse) ProtoMessage() {}
|
|
|
|
|
func (*DeleteResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{10}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{12}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -523,7 +596,7 @@ func (m *UpdateResponse) Reset() { *m = UpdateResponse{} }
|
|
|
|
|
func (m *UpdateResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*UpdateResponse) ProtoMessage() {}
|
|
|
|
|
func (*UpdateResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{11}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{13}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -561,7 +634,7 @@ 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_6a36eee0b1adf739, []int{12}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{14}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Event) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -620,7 +693,7 @@ func (m *Query) Reset() { *m = Query{} }
|
|
|
|
|
func (m *Query) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Query) ProtoMessage() {}
|
|
|
|
|
func (*Query) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{13}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{15}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Query) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -687,7 +760,7 @@ func (m *Route) Reset() { *m = Route{} }
|
|
|
|
|
func (m *Route) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Route) ProtoMessage() {}
|
|
|
|
|
func (*Route) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{14}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{16}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Route) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -769,7 +842,7 @@ func (m *Status) Reset() { *m = Status{} }
|
|
|
|
|
func (m *Status) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*Status) ProtoMessage() {}
|
|
|
|
|
func (*Status) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{15}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{17}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Status) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -815,7 +888,7 @@ func (m *StatusResponse) Reset() { *m = StatusResponse{} }
|
|
|
|
|
func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
|
|
|
|
|
func (*StatusResponse) ProtoMessage() {}
|
|
|
|
|
func (*StatusResponse) Descriptor() ([]byte, []int) {
|
|
|
|
|
return fileDescriptor_6a36eee0b1adf739, []int{16}
|
|
|
|
|
return fileDescriptor_367072455c71aedc, []int{18}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *StatusResponse) XXX_Unmarshal(b []byte) error {
|
|
|
|
@ -847,6 +920,7 @@ func init() {
|
|
|
|
|
proto.RegisterEnum("go.micro.router.AdvertType", AdvertType_name, AdvertType_value)
|
|
|
|
|
proto.RegisterEnum("go.micro.router.EventType", EventType_name, EventType_value)
|
|
|
|
|
proto.RegisterType((*Request)(nil), "go.micro.router.Request")
|
|
|
|
|
proto.RegisterType((*Response)(nil), "go.micro.router.Response")
|
|
|
|
|
proto.RegisterType((*ListResponse)(nil), "go.micro.router.ListResponse")
|
|
|
|
|
proto.RegisterType((*LookupRequest)(nil), "go.micro.router.LookupRequest")
|
|
|
|
|
proto.RegisterType((*LookupResponse)(nil), "go.micro.router.LookupResponse")
|
|
|
|
@ -854,6 +928,7 @@ func init() {
|
|
|
|
|
proto.RegisterType((*QueryResponse)(nil), "go.micro.router.QueryResponse")
|
|
|
|
|
proto.RegisterType((*WatchRequest)(nil), "go.micro.router.WatchRequest")
|
|
|
|
|
proto.RegisterType((*Advert)(nil), "go.micro.router.Advert")
|
|
|
|
|
proto.RegisterType((*Solicit)(nil), "go.micro.router.Solicit")
|
|
|
|
|
proto.RegisterType((*ProcessResponse)(nil), "go.micro.router.ProcessResponse")
|
|
|
|
|
proto.RegisterType((*CreateResponse)(nil), "go.micro.router.CreateResponse")
|
|
|
|
|
proto.RegisterType((*DeleteResponse)(nil), "go.micro.router.DeleteResponse")
|
|
|
|
@ -865,509 +940,53 @@ func init() {
|
|
|
|
|
proto.RegisterType((*StatusResponse)(nil), "go.micro.router.StatusResponse")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
proto.RegisterFile("micro/go-micro/router/proto/router.proto", fileDescriptor_6a36eee0b1adf739)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var fileDescriptor_6a36eee0b1adf739 = []byte{
|
|
|
|
|
// 699 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcd, 0x4e, 0xdb, 0x40,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x89, 0x7f, 0xf5, 0xeb, 0xff, 0x01, 0x00,
|
|
|
|
|
0x00, 0xff, 0xff, 0xe2, 0xe9, 0xe2, 0x3b, 0xd7, 0x07, 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
|
|
|
|
|
|
|
|
|
|
// RouterClient is the client API for Router service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type RouterClient interface {
|
|
|
|
|
Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error)
|
|
|
|
|
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Router_WatchClient, error)
|
|
|
|
|
Advertise(ctx context.Context, in *Request, opts ...grpc.CallOption) (Router_AdvertiseClient, error)
|
|
|
|
|
Process(ctx context.Context, in *Advert, opts ...grpc.CallOption) (*ProcessResponse, error)
|
|
|
|
|
Status(ctx context.Context, in *Request, opts ...grpc.CallOption) (*StatusResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type routerClient struct {
|
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewRouterClient(cc *grpc.ClientConn) RouterClient {
|
|
|
|
|
return &routerClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *routerClient) Lookup(ctx context.Context, in *LookupRequest, opts ...grpc.CallOption) (*LookupResponse, error) {
|
|
|
|
|
out := new(LookupResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Router/Lookup", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *routerClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Router_WatchClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[0], "/go.micro.router.Router/Watch", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
x := &routerWatchClient{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 Router_WatchClient interface {
|
|
|
|
|
Recv() (*Event, error)
|
|
|
|
|
grpc.ClientStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type routerWatchClient struct {
|
|
|
|
|
grpc.ClientStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *routerWatchClient) Recv() (*Event, error) {
|
|
|
|
|
m := new(Event)
|
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *routerClient) Advertise(ctx context.Context, in *Request, opts ...grpc.CallOption) (Router_AdvertiseClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Router_serviceDesc.Streams[1], "/go.micro.router.Router/Advertise", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
x := &routerAdvertiseClient{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 Router_AdvertiseClient interface {
|
|
|
|
|
Recv() (*Advert, error)
|
|
|
|
|
grpc.ClientStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type routerAdvertiseClient struct {
|
|
|
|
|
grpc.ClientStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *routerAdvertiseClient) Recv() (*Advert, error) {
|
|
|
|
|
m := new(Advert)
|
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *routerClient) Process(ctx context.Context, in *Advert, opts ...grpc.CallOption) (*ProcessResponse, error) {
|
|
|
|
|
out := new(ProcessResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Router/Process", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *routerClient) Status(ctx context.Context, in *Request, opts ...grpc.CallOption) (*StatusResponse, error) {
|
|
|
|
|
out := new(StatusResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Router/Status", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// RouterServer is the server API for Router service.
|
|
|
|
|
type RouterServer interface {
|
|
|
|
|
Lookup(context.Context, *LookupRequest) (*LookupResponse, error)
|
|
|
|
|
Watch(*WatchRequest, Router_WatchServer) error
|
|
|
|
|
Advertise(*Request, Router_AdvertiseServer) error
|
|
|
|
|
Process(context.Context, *Advert) (*ProcessResponse, error)
|
|
|
|
|
Status(context.Context, *Request) (*StatusResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterRouterServer(s *grpc.Server, srv RouterServer) {
|
|
|
|
|
s.RegisterService(&_Router_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Router_Lookup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(LookupRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(RouterServer).Lookup(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Router/Lookup",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(RouterServer).Lookup(ctx, req.(*LookupRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Router_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
|
m := new(WatchRequest)
|
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return srv.(RouterServer).Watch(m, &routerWatchServer{stream})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Router_WatchServer interface {
|
|
|
|
|
Send(*Event) error
|
|
|
|
|
grpc.ServerStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type routerWatchServer struct {
|
|
|
|
|
grpc.ServerStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *routerWatchServer) Send(m *Event) error {
|
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Router_Advertise_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
|
m := new(Request)
|
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
return srv.(RouterServer).Advertise(m, &routerAdvertiseServer{stream})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Router_AdvertiseServer interface {
|
|
|
|
|
Send(*Advert) error
|
|
|
|
|
grpc.ServerStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type routerAdvertiseServer struct {
|
|
|
|
|
grpc.ServerStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *routerAdvertiseServer) Send(m *Advert) error {
|
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Router_Process_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(Advert)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(RouterServer).Process(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Router/Process",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(RouterServer).Process(ctx, req.(*Advert))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Router_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(Request)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(RouterServer).Status(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Router/Status",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(RouterServer).Status(ctx, req.(*Request))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _Router_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "go.micro.router.Router",
|
|
|
|
|
HandlerType: (*RouterServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Lookup",
|
|
|
|
|
Handler: _Router_Lookup_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Process",
|
|
|
|
|
Handler: _Router_Process_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Status",
|
|
|
|
|
Handler: _Router_Status_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{
|
|
|
|
|
{
|
|
|
|
|
StreamName: "Watch",
|
|
|
|
|
Handler: _Router_Watch_Handler,
|
|
|
|
|
ServerStreams: true,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
StreamName: "Advertise",
|
|
|
|
|
Handler: _Router_Advertise_Handler,
|
|
|
|
|
ServerStreams: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Metadata: "micro/go-micro/router/proto/router.proto",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TableClient is the client API for Table service.
|
|
|
|
|
//
|
|
|
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
|
|
type TableClient interface {
|
|
|
|
|
Create(ctx context.Context, in *Route, opts ...grpc.CallOption) (*CreateResponse, error)
|
|
|
|
|
Delete(ctx context.Context, in *Route, opts ...grpc.CallOption) (*DeleteResponse, error)
|
|
|
|
|
Update(ctx context.Context, in *Route, opts ...grpc.CallOption) (*UpdateResponse, error)
|
|
|
|
|
List(ctx context.Context, in *Request, opts ...grpc.CallOption) (*ListResponse, error)
|
|
|
|
|
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type tableClient struct {
|
|
|
|
|
cc *grpc.ClientConn
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewTableClient(cc *grpc.ClientConn) TableClient {
|
|
|
|
|
return &tableClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *tableClient) Create(ctx context.Context, in *Route, opts ...grpc.CallOption) (*CreateResponse, error) {
|
|
|
|
|
out := new(CreateResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Create", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *tableClient) Delete(ctx context.Context, in *Route, opts ...grpc.CallOption) (*DeleteResponse, error) {
|
|
|
|
|
out := new(DeleteResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Delete", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *tableClient) Update(ctx context.Context, in *Route, opts ...grpc.CallOption) (*UpdateResponse, error) {
|
|
|
|
|
out := new(UpdateResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Update", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *tableClient) List(ctx context.Context, in *Request, opts ...grpc.CallOption) (*ListResponse, error) {
|
|
|
|
|
out := new(ListResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Table/List", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *tableClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
|
|
|
|
|
out := new(QueryResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/go.micro.router.Table/Query", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// TableServer is the server API for Table service.
|
|
|
|
|
type TableServer interface {
|
|
|
|
|
Create(context.Context, *Route) (*CreateResponse, error)
|
|
|
|
|
Delete(context.Context, *Route) (*DeleteResponse, error)
|
|
|
|
|
Update(context.Context, *Route) (*UpdateResponse, error)
|
|
|
|
|
List(context.Context, *Request) (*ListResponse, error)
|
|
|
|
|
Query(context.Context, *QueryRequest) (*QueryResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterTableServer(s *grpc.Server, srv TableServer) {
|
|
|
|
|
s.RegisterService(&_Table_serviceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Table_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(Route)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(TableServer).Create(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Table/Create",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(TableServer).Create(ctx, req.(*Route))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Table_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(Route)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(TableServer).Delete(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Table/Delete",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(TableServer).Delete(ctx, req.(*Route))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Table_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(Route)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(TableServer).Update(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Table/Update",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(TableServer).Update(ctx, req.(*Route))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Table_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(Request)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(TableServer).List(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Table/List",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(TableServer).List(ctx, req.(*Request))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Table_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(QueryRequest)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(TableServer).Query(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/go.micro.router.Table/Query",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(TableServer).Query(ctx, req.(*QueryRequest))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _Table_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "go.micro.router.Table",
|
|
|
|
|
HandlerType: (*TableServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Create",
|
|
|
|
|
Handler: _Table_Create_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Delete",
|
|
|
|
|
Handler: _Table_Delete_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Update",
|
|
|
|
|
Handler: _Table_Update_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "List",
|
|
|
|
|
Handler: _Table_List_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "Query",
|
|
|
|
|
Handler: _Table_Query_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{},
|
|
|
|
|
Metadata: "micro/go-micro/router/proto/router.proto",
|
|
|
|
|
func init() { proto.RegisterFile("router.proto", fileDescriptor_367072455c71aedc) }
|
|
|
|
|
|
|
|
|
|
var fileDescriptor_367072455c71aedc = []byte{
|
|
|
|
|
// 714 bytes of a gzipped FileDescriptorProto
|
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x4e, 0xdb, 0x40,
|
|
|
|
|
0x10, 0xb6, 0x93, 0xd8, 0x69, 0xa6, 0x21, 0xa4, 0xa3, 0x0a, 0x4c, 0x5a, 0x20, 0xf2, 0x09, 0x21,
|
|
|
|
|
0x64, 0xaa, 0xf4, 0xda, 0x1f, 0x02, 0xa5, 0xaa, 0x54, 0x0e, 0xad, 0x01, 0xf5, 0x6c, 0xec, 0x15,
|
|
|
|
|
0xb5, 0x48, 0xbc, 0x66, 0x77, 0x03, 0xca, 0xb9, 0x4f, 0xd3, 0x4b, 0x2f, 0x7d, 0xa4, 0xbe, 0x48,
|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