github.com/micro/go-micro/v2@v2.9.1/registry/service/proto/registry.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: registry/service/proto/registry.proto
     3  
     4  package go_micro_registry
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	proto "github.com/golang/protobuf/proto"
    10  	grpc "google.golang.org/grpc"
    11  	codes "google.golang.org/grpc/codes"
    12  	status "google.golang.org/grpc/status"
    13  	math "math"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  // EventType defines the type of event
    28  type EventType int32
    29  
    30  const (
    31  	EventType_Create EventType = 0
    32  	EventType_Delete EventType = 1
    33  	EventType_Update EventType = 2
    34  )
    35  
    36  var EventType_name = map[int32]string{
    37  	0: "Create",
    38  	1: "Delete",
    39  	2: "Update",
    40  }
    41  
    42  var EventType_value = map[string]int32{
    43  	"Create": 0,
    44  	"Delete": 1,
    45  	"Update": 2,
    46  }
    47  
    48  func (x EventType) String() string {
    49  	return proto.EnumName(EventType_name, int32(x))
    50  }
    51  
    52  func (EventType) EnumDescriptor() ([]byte, []int) {
    53  	return fileDescriptor_3f5817c11f323eb6, []int{0}
    54  }
    55  
    56  // Service represents a go-micro service
    57  type Service struct {
    58  	Name                 string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    59  	Version              string            `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
    60  	Metadata             map[string]string `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
    61  	Endpoints            []*Endpoint       `protobuf:"bytes,4,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
    62  	Nodes                []*Node           `protobuf:"bytes,5,rep,name=nodes,proto3" json:"nodes,omitempty"`
    63  	Options              *Options          `protobuf:"bytes,6,opt,name=options,proto3" json:"options,omitempty"`
    64  	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    65  	XXX_unrecognized     []byte            `json:"-"`
    66  	XXX_sizecache        int32             `json:"-"`
    67  }
    68  
    69  func (m *Service) Reset()         { *m = Service{} }
    70  func (m *Service) String() string { return proto.CompactTextString(m) }
    71  func (*Service) ProtoMessage()    {}
    72  func (*Service) Descriptor() ([]byte, []int) {
    73  	return fileDescriptor_3f5817c11f323eb6, []int{0}
    74  }
    75  
    76  func (m *Service) XXX_Unmarshal(b []byte) error {
    77  	return xxx_messageInfo_Service.Unmarshal(m, b)
    78  }
    79  func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    80  	return xxx_messageInfo_Service.Marshal(b, m, deterministic)
    81  }
    82  func (m *Service) XXX_Merge(src proto.Message) {
    83  	xxx_messageInfo_Service.Merge(m, src)
    84  }
    85  func (m *Service) XXX_Size() int {
    86  	return xxx_messageInfo_Service.Size(m)
    87  }
    88  func (m *Service) XXX_DiscardUnknown() {
    89  	xxx_messageInfo_Service.DiscardUnknown(m)
    90  }
    91  
    92  var xxx_messageInfo_Service proto.InternalMessageInfo
    93  
    94  func (m *Service) GetName() string {
    95  	if m != nil {
    96  		return m.Name
    97  	}
    98  	return ""
    99  }
   100  
   101  func (m *Service) GetVersion() string {
   102  	if m != nil {
   103  		return m.Version
   104  	}
   105  	return ""
   106  }
   107  
   108  func (m *Service) GetMetadata() map[string]string {
   109  	if m != nil {
   110  		return m.Metadata
   111  	}
   112  	return nil
   113  }
   114  
   115  func (m *Service) GetEndpoints() []*Endpoint {
   116  	if m != nil {
   117  		return m.Endpoints
   118  	}
   119  	return nil
   120  }
   121  
   122  func (m *Service) GetNodes() []*Node {
   123  	if m != nil {
   124  		return m.Nodes
   125  	}
   126  	return nil
   127  }
   128  
   129  func (m *Service) GetOptions() *Options {
   130  	if m != nil {
   131  		return m.Options
   132  	}
   133  	return nil
   134  }
   135  
   136  // Node represents the node the service is on
   137  type Node struct {
   138  	Id                   string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
   139  	Address              string            `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
   140  	Port                 int64             `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
   141  	Metadata             map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
   142  	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
   143  	XXX_unrecognized     []byte            `json:"-"`
   144  	XXX_sizecache        int32             `json:"-"`
   145  }
   146  
   147  func (m *Node) Reset()         { *m = Node{} }
   148  func (m *Node) String() string { return proto.CompactTextString(m) }
   149  func (*Node) ProtoMessage()    {}
   150  func (*Node) Descriptor() ([]byte, []int) {
   151  	return fileDescriptor_3f5817c11f323eb6, []int{1}
   152  }
   153  
   154  func (m *Node) XXX_Unmarshal(b []byte) error {
   155  	return xxx_messageInfo_Node.Unmarshal(m, b)
   156  }
   157  func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   158  	return xxx_messageInfo_Node.Marshal(b, m, deterministic)
   159  }
   160  func (m *Node) XXX_Merge(src proto.Message) {
   161  	xxx_messageInfo_Node.Merge(m, src)
   162  }
   163  func (m *Node) XXX_Size() int {
   164  	return xxx_messageInfo_Node.Size(m)
   165  }
   166  func (m *Node) XXX_DiscardUnknown() {
   167  	xxx_messageInfo_Node.DiscardUnknown(m)
   168  }
   169  
   170  var xxx_messageInfo_Node proto.InternalMessageInfo
   171  
   172  func (m *Node) GetId() string {
   173  	if m != nil {
   174  		return m.Id
   175  	}
   176  	return ""
   177  }
   178  
   179  func (m *Node) GetAddress() string {
   180  	if m != nil {
   181  		return m.Address
   182  	}
   183  	return ""
   184  }
   185  
   186  func (m *Node) GetPort() int64 {
   187  	if m != nil {
   188  		return m.Port
   189  	}
   190  	return 0
   191  }
   192  
   193  func (m *Node) GetMetadata() map[string]string {
   194  	if m != nil {
   195  		return m.Metadata
   196  	}
   197  	return nil
   198  }
   199  
   200  // Endpoint is a endpoint provided by a service
   201  type Endpoint struct {
   202  	Name                 string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   203  	Request              *Value            `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
   204  	Response             *Value            `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"`
   205  	Metadata             map[string]string `protobuf:"bytes,4,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
   206  	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
   207  	XXX_unrecognized     []byte            `json:"-"`
   208  	XXX_sizecache        int32             `json:"-"`
   209  }
   210  
   211  func (m *Endpoint) Reset()         { *m = Endpoint{} }
   212  func (m *Endpoint) String() string { return proto.CompactTextString(m) }
   213  func (*Endpoint) ProtoMessage()    {}
   214  func (*Endpoint) Descriptor() ([]byte, []int) {
   215  	return fileDescriptor_3f5817c11f323eb6, []int{2}
   216  }
   217  
   218  func (m *Endpoint) XXX_Unmarshal(b []byte) error {
   219  	return xxx_messageInfo_Endpoint.Unmarshal(m, b)
   220  }
   221  func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   222  	return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic)
   223  }
   224  func (m *Endpoint) XXX_Merge(src proto.Message) {
   225  	xxx_messageInfo_Endpoint.Merge(m, src)
   226  }
   227  func (m *Endpoint) XXX_Size() int {
   228  	return xxx_messageInfo_Endpoint.Size(m)
   229  }
   230  func (m *Endpoint) XXX_DiscardUnknown() {
   231  	xxx_messageInfo_Endpoint.DiscardUnknown(m)
   232  }
   233  
   234  var xxx_messageInfo_Endpoint proto.InternalMessageInfo
   235  
   236  func (m *Endpoint) GetName() string {
   237  	if m != nil {
   238  		return m.Name
   239  	}
   240  	return ""
   241  }
   242  
   243  func (m *Endpoint) GetRequest() *Value {
   244  	if m != nil {
   245  		return m.Request
   246  	}
   247  	return nil
   248  }
   249  
   250  func (m *Endpoint) GetResponse() *Value {
   251  	if m != nil {
   252  		return m.Response
   253  	}
   254  	return nil
   255  }
   256  
   257  func (m *Endpoint) GetMetadata() map[string]string {
   258  	if m != nil {
   259  		return m.Metadata
   260  	}
   261  	return nil
   262  }
   263  
   264  // Value is an opaque value for a request or response
   265  type Value struct {
   266  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   267  	Type                 string   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
   268  	Values               []*Value `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
   269  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   270  	XXX_unrecognized     []byte   `json:"-"`
   271  	XXX_sizecache        int32    `json:"-"`
   272  }
   273  
   274  func (m *Value) Reset()         { *m = Value{} }
   275  func (m *Value) String() string { return proto.CompactTextString(m) }
   276  func (*Value) ProtoMessage()    {}
   277  func (*Value) Descriptor() ([]byte, []int) {
   278  	return fileDescriptor_3f5817c11f323eb6, []int{3}
   279  }
   280  
   281  func (m *Value) XXX_Unmarshal(b []byte) error {
   282  	return xxx_messageInfo_Value.Unmarshal(m, b)
   283  }
   284  func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   285  	return xxx_messageInfo_Value.Marshal(b, m, deterministic)
   286  }
   287  func (m *Value) XXX_Merge(src proto.Message) {
   288  	xxx_messageInfo_Value.Merge(m, src)
   289  }
   290  func (m *Value) XXX_Size() int {
   291  	return xxx_messageInfo_Value.Size(m)
   292  }
   293  func (m *Value) XXX_DiscardUnknown() {
   294  	xxx_messageInfo_Value.DiscardUnknown(m)
   295  }
   296  
   297  var xxx_messageInfo_Value proto.InternalMessageInfo
   298  
   299  func (m *Value) GetName() string {
   300  	if m != nil {
   301  		return m.Name
   302  	}
   303  	return ""
   304  }
   305  
   306  func (m *Value) GetType() string {
   307  	if m != nil {
   308  		return m.Type
   309  	}
   310  	return ""
   311  }
   312  
   313  func (m *Value) GetValues() []*Value {
   314  	if m != nil {
   315  		return m.Values
   316  	}
   317  	return nil
   318  }
   319  
   320  // Options are registry options
   321  type Options struct {
   322  	Ttl                  int64    `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"`
   323  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   324  	XXX_unrecognized     []byte   `json:"-"`
   325  	XXX_sizecache        int32    `json:"-"`
   326  }
   327  
   328  func (m *Options) Reset()         { *m = Options{} }
   329  func (m *Options) String() string { return proto.CompactTextString(m) }
   330  func (*Options) ProtoMessage()    {}
   331  func (*Options) Descriptor() ([]byte, []int) {
   332  	return fileDescriptor_3f5817c11f323eb6, []int{4}
   333  }
   334  
   335  func (m *Options) XXX_Unmarshal(b []byte) error {
   336  	return xxx_messageInfo_Options.Unmarshal(m, b)
   337  }
   338  func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   339  	return xxx_messageInfo_Options.Marshal(b, m, deterministic)
   340  }
   341  func (m *Options) XXX_Merge(src proto.Message) {
   342  	xxx_messageInfo_Options.Merge(m, src)
   343  }
   344  func (m *Options) XXX_Size() int {
   345  	return xxx_messageInfo_Options.Size(m)
   346  }
   347  func (m *Options) XXX_DiscardUnknown() {
   348  	xxx_messageInfo_Options.DiscardUnknown(m)
   349  }
   350  
   351  var xxx_messageInfo_Options proto.InternalMessageInfo
   352  
   353  func (m *Options) GetTtl() int64 {
   354  	if m != nil {
   355  		return m.Ttl
   356  	}
   357  	return 0
   358  }
   359  
   360  // Result is returns by the watcher
   361  type Result struct {
   362  	Action               string   `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
   363  	Service              *Service `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"`
   364  	Timestamp            int64    `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
   365  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   366  	XXX_unrecognized     []byte   `json:"-"`
   367  	XXX_sizecache        int32    `json:"-"`
   368  }
   369  
   370  func (m *Result) Reset()         { *m = Result{} }
   371  func (m *Result) String() string { return proto.CompactTextString(m) }
   372  func (*Result) ProtoMessage()    {}
   373  func (*Result) Descriptor() ([]byte, []int) {
   374  	return fileDescriptor_3f5817c11f323eb6, []int{5}
   375  }
   376  
   377  func (m *Result) XXX_Unmarshal(b []byte) error {
   378  	return xxx_messageInfo_Result.Unmarshal(m, b)
   379  }
   380  func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   381  	return xxx_messageInfo_Result.Marshal(b, m, deterministic)
   382  }
   383  func (m *Result) XXX_Merge(src proto.Message) {
   384  	xxx_messageInfo_Result.Merge(m, src)
   385  }
   386  func (m *Result) XXX_Size() int {
   387  	return xxx_messageInfo_Result.Size(m)
   388  }
   389  func (m *Result) XXX_DiscardUnknown() {
   390  	xxx_messageInfo_Result.DiscardUnknown(m)
   391  }
   392  
   393  var xxx_messageInfo_Result proto.InternalMessageInfo
   394  
   395  func (m *Result) GetAction() string {
   396  	if m != nil {
   397  		return m.Action
   398  	}
   399  	return ""
   400  }
   401  
   402  func (m *Result) GetService() *Service {
   403  	if m != nil {
   404  		return m.Service
   405  	}
   406  	return nil
   407  }
   408  
   409  func (m *Result) GetTimestamp() int64 {
   410  	if m != nil {
   411  		return m.Timestamp
   412  	}
   413  	return 0
   414  }
   415  
   416  type EmptyResponse struct {
   417  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   418  	XXX_unrecognized     []byte   `json:"-"`
   419  	XXX_sizecache        int32    `json:"-"`
   420  }
   421  
   422  func (m *EmptyResponse) Reset()         { *m = EmptyResponse{} }
   423  func (m *EmptyResponse) String() string { return proto.CompactTextString(m) }
   424  func (*EmptyResponse) ProtoMessage()    {}
   425  func (*EmptyResponse) Descriptor() ([]byte, []int) {
   426  	return fileDescriptor_3f5817c11f323eb6, []int{6}
   427  }
   428  
   429  func (m *EmptyResponse) XXX_Unmarshal(b []byte) error {
   430  	return xxx_messageInfo_EmptyResponse.Unmarshal(m, b)
   431  }
   432  func (m *EmptyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   433  	return xxx_messageInfo_EmptyResponse.Marshal(b, m, deterministic)
   434  }
   435  func (m *EmptyResponse) XXX_Merge(src proto.Message) {
   436  	xxx_messageInfo_EmptyResponse.Merge(m, src)
   437  }
   438  func (m *EmptyResponse) XXX_Size() int {
   439  	return xxx_messageInfo_EmptyResponse.Size(m)
   440  }
   441  func (m *EmptyResponse) XXX_DiscardUnknown() {
   442  	xxx_messageInfo_EmptyResponse.DiscardUnknown(m)
   443  }
   444  
   445  var xxx_messageInfo_EmptyResponse proto.InternalMessageInfo
   446  
   447  type GetRequest struct {
   448  	Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
   449  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   450  	XXX_unrecognized     []byte   `json:"-"`
   451  	XXX_sizecache        int32    `json:"-"`
   452  }
   453  
   454  func (m *GetRequest) Reset()         { *m = GetRequest{} }
   455  func (m *GetRequest) String() string { return proto.CompactTextString(m) }
   456  func (*GetRequest) ProtoMessage()    {}
   457  func (*GetRequest) Descriptor() ([]byte, []int) {
   458  	return fileDescriptor_3f5817c11f323eb6, []int{7}
   459  }
   460  
   461  func (m *GetRequest) XXX_Unmarshal(b []byte) error {
   462  	return xxx_messageInfo_GetRequest.Unmarshal(m, b)
   463  }
   464  func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   465  	return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic)
   466  }
   467  func (m *GetRequest) XXX_Merge(src proto.Message) {
   468  	xxx_messageInfo_GetRequest.Merge(m, src)
   469  }
   470  func (m *GetRequest) XXX_Size() int {
   471  	return xxx_messageInfo_GetRequest.Size(m)
   472  }
   473  func (m *GetRequest) XXX_DiscardUnknown() {
   474  	xxx_messageInfo_GetRequest.DiscardUnknown(m)
   475  }
   476  
   477  var xxx_messageInfo_GetRequest proto.InternalMessageInfo
   478  
   479  func (m *GetRequest) GetService() string {
   480  	if m != nil {
   481  		return m.Service
   482  	}
   483  	return ""
   484  }
   485  
   486  type GetResponse struct {
   487  	Services             []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
   488  	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
   489  	XXX_unrecognized     []byte     `json:"-"`
   490  	XXX_sizecache        int32      `json:"-"`
   491  }
   492  
   493  func (m *GetResponse) Reset()         { *m = GetResponse{} }
   494  func (m *GetResponse) String() string { return proto.CompactTextString(m) }
   495  func (*GetResponse) ProtoMessage()    {}
   496  func (*GetResponse) Descriptor() ([]byte, []int) {
   497  	return fileDescriptor_3f5817c11f323eb6, []int{8}
   498  }
   499  
   500  func (m *GetResponse) XXX_Unmarshal(b []byte) error {
   501  	return xxx_messageInfo_GetResponse.Unmarshal(m, b)
   502  }
   503  func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   504  	return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic)
   505  }
   506  func (m *GetResponse) XXX_Merge(src proto.Message) {
   507  	xxx_messageInfo_GetResponse.Merge(m, src)
   508  }
   509  func (m *GetResponse) XXX_Size() int {
   510  	return xxx_messageInfo_GetResponse.Size(m)
   511  }
   512  func (m *GetResponse) XXX_DiscardUnknown() {
   513  	xxx_messageInfo_GetResponse.DiscardUnknown(m)
   514  }
   515  
   516  var xxx_messageInfo_GetResponse proto.InternalMessageInfo
   517  
   518  func (m *GetResponse) GetServices() []*Service {
   519  	if m != nil {
   520  		return m.Services
   521  	}
   522  	return nil
   523  }
   524  
   525  type ListRequest struct {
   526  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   527  	XXX_unrecognized     []byte   `json:"-"`
   528  	XXX_sizecache        int32    `json:"-"`
   529  }
   530  
   531  func (m *ListRequest) Reset()         { *m = ListRequest{} }
   532  func (m *ListRequest) String() string { return proto.CompactTextString(m) }
   533  func (*ListRequest) ProtoMessage()    {}
   534  func (*ListRequest) Descriptor() ([]byte, []int) {
   535  	return fileDescriptor_3f5817c11f323eb6, []int{9}
   536  }
   537  
   538  func (m *ListRequest) XXX_Unmarshal(b []byte) error {
   539  	return xxx_messageInfo_ListRequest.Unmarshal(m, b)
   540  }
   541  func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   542  	return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic)
   543  }
   544  func (m *ListRequest) XXX_Merge(src proto.Message) {
   545  	xxx_messageInfo_ListRequest.Merge(m, src)
   546  }
   547  func (m *ListRequest) XXX_Size() int {
   548  	return xxx_messageInfo_ListRequest.Size(m)
   549  }
   550  func (m *ListRequest) XXX_DiscardUnknown() {
   551  	xxx_messageInfo_ListRequest.DiscardUnknown(m)
   552  }
   553  
   554  var xxx_messageInfo_ListRequest proto.InternalMessageInfo
   555  
   556  type ListResponse struct {
   557  	Services             []*Service `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
   558  	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
   559  	XXX_unrecognized     []byte     `json:"-"`
   560  	XXX_sizecache        int32      `json:"-"`
   561  }
   562  
   563  func (m *ListResponse) Reset()         { *m = ListResponse{} }
   564  func (m *ListResponse) String() string { return proto.CompactTextString(m) }
   565  func (*ListResponse) ProtoMessage()    {}
   566  func (*ListResponse) Descriptor() ([]byte, []int) {
   567  	return fileDescriptor_3f5817c11f323eb6, []int{10}
   568  }
   569  
   570  func (m *ListResponse) XXX_Unmarshal(b []byte) error {
   571  	return xxx_messageInfo_ListResponse.Unmarshal(m, b)
   572  }
   573  func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   574  	return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic)
   575  }
   576  func (m *ListResponse) XXX_Merge(src proto.Message) {
   577  	xxx_messageInfo_ListResponse.Merge(m, src)
   578  }
   579  func (m *ListResponse) XXX_Size() int {
   580  	return xxx_messageInfo_ListResponse.Size(m)
   581  }
   582  func (m *ListResponse) XXX_DiscardUnknown() {
   583  	xxx_messageInfo_ListResponse.DiscardUnknown(m)
   584  }
   585  
   586  var xxx_messageInfo_ListResponse proto.InternalMessageInfo
   587  
   588  func (m *ListResponse) GetServices() []*Service {
   589  	if m != nil {
   590  		return m.Services
   591  	}
   592  	return nil
   593  }
   594  
   595  type WatchRequest struct {
   596  	// service is optional
   597  	Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
   598  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   599  	XXX_unrecognized     []byte   `json:"-"`
   600  	XXX_sizecache        int32    `json:"-"`
   601  }
   602  
   603  func (m *WatchRequest) Reset()         { *m = WatchRequest{} }
   604  func (m *WatchRequest) String() string { return proto.CompactTextString(m) }
   605  func (*WatchRequest) ProtoMessage()    {}
   606  func (*WatchRequest) Descriptor() ([]byte, []int) {
   607  	return fileDescriptor_3f5817c11f323eb6, []int{11}
   608  }
   609  
   610  func (m *WatchRequest) XXX_Unmarshal(b []byte) error {
   611  	return xxx_messageInfo_WatchRequest.Unmarshal(m, b)
   612  }
   613  func (m *WatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   614  	return xxx_messageInfo_WatchRequest.Marshal(b, m, deterministic)
   615  }
   616  func (m *WatchRequest) XXX_Merge(src proto.Message) {
   617  	xxx_messageInfo_WatchRequest.Merge(m, src)
   618  }
   619  func (m *WatchRequest) XXX_Size() int {
   620  	return xxx_messageInfo_WatchRequest.Size(m)
   621  }
   622  func (m *WatchRequest) XXX_DiscardUnknown() {
   623  	xxx_messageInfo_WatchRequest.DiscardUnknown(m)
   624  }
   625  
   626  var xxx_messageInfo_WatchRequest proto.InternalMessageInfo
   627  
   628  func (m *WatchRequest) GetService() string {
   629  	if m != nil {
   630  		return m.Service
   631  	}
   632  	return ""
   633  }
   634  
   635  // Event is registry event
   636  type Event struct {
   637  	// Event Id
   638  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
   639  	// type of event
   640  	Type EventType `protobuf:"varint,2,opt,name=type,proto3,enum=go.micro.registry.EventType" json:"type,omitempty"`
   641  	// unix timestamp of event
   642  	Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
   643  	// service entry
   644  	Service              *Service `protobuf:"bytes,4,opt,name=service,proto3" json:"service,omitempty"`
   645  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   646  	XXX_unrecognized     []byte   `json:"-"`
   647  	XXX_sizecache        int32    `json:"-"`
   648  }
   649  
   650  func (m *Event) Reset()         { *m = Event{} }
   651  func (m *Event) String() string { return proto.CompactTextString(m) }
   652  func (*Event) ProtoMessage()    {}
   653  func (*Event) Descriptor() ([]byte, []int) {
   654  	return fileDescriptor_3f5817c11f323eb6, []int{12}
   655  }
   656  
   657  func (m *Event) XXX_Unmarshal(b []byte) error {
   658  	return xxx_messageInfo_Event.Unmarshal(m, b)
   659  }
   660  func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   661  	return xxx_messageInfo_Event.Marshal(b, m, deterministic)
   662  }
   663  func (m *Event) XXX_Merge(src proto.Message) {
   664  	xxx_messageInfo_Event.Merge(m, src)
   665  }
   666  func (m *Event) XXX_Size() int {
   667  	return xxx_messageInfo_Event.Size(m)
   668  }
   669  func (m *Event) XXX_DiscardUnknown() {
   670  	xxx_messageInfo_Event.DiscardUnknown(m)
   671  }
   672  
   673  var xxx_messageInfo_Event proto.InternalMessageInfo
   674  
   675  func (m *Event) GetId() string {
   676  	if m != nil {
   677  		return m.Id
   678  	}
   679  	return ""
   680  }
   681  
   682  func (m *Event) GetType() EventType {
   683  	if m != nil {
   684  		return m.Type
   685  	}
   686  	return EventType_Create
   687  }
   688  
   689  func (m *Event) GetTimestamp() int64 {
   690  	if m != nil {
   691  		return m.Timestamp
   692  	}
   693  	return 0
   694  }
   695  
   696  func (m *Event) GetService() *Service {
   697  	if m != nil {
   698  		return m.Service
   699  	}
   700  	return nil
   701  }
   702  
   703  func init() {
   704  	proto.RegisterEnum("go.micro.registry.EventType", EventType_name, EventType_value)
   705  	proto.RegisterType((*Service)(nil), "go.micro.registry.Service")
   706  	proto.RegisterMapType((map[string]string)(nil), "go.micro.registry.Service.MetadataEntry")
   707  	proto.RegisterType((*Node)(nil), "go.micro.registry.Node")
   708  	proto.RegisterMapType((map[string]string)(nil), "go.micro.registry.Node.MetadataEntry")
   709  	proto.RegisterType((*Endpoint)(nil), "go.micro.registry.Endpoint")
   710  	proto.RegisterMapType((map[string]string)(nil), "go.micro.registry.Endpoint.MetadataEntry")
   711  	proto.RegisterType((*Value)(nil), "go.micro.registry.Value")
   712  	proto.RegisterType((*Options)(nil), "go.micro.registry.Options")
   713  	proto.RegisterType((*Result)(nil), "go.micro.registry.Result")
   714  	proto.RegisterType((*EmptyResponse)(nil), "go.micro.registry.EmptyResponse")
   715  	proto.RegisterType((*GetRequest)(nil), "go.micro.registry.GetRequest")
   716  	proto.RegisterType((*GetResponse)(nil), "go.micro.registry.GetResponse")
   717  	proto.RegisterType((*ListRequest)(nil), "go.micro.registry.ListRequest")
   718  	proto.RegisterType((*ListResponse)(nil), "go.micro.registry.ListResponse")
   719  	proto.RegisterType((*WatchRequest)(nil), "go.micro.registry.WatchRequest")
   720  	proto.RegisterType((*Event)(nil), "go.micro.registry.Event")
   721  }
   722  
   723  func init() {
   724  	proto.RegisterFile("registry/service/proto/registry.proto", fileDescriptor_3f5817c11f323eb6)
   725  }
   726  
   727  var fileDescriptor_3f5817c11f323eb6 = []byte{
   728  	// 675 bytes of a gzipped FileDescriptorProto
   729  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdd, 0x6e, 0xd3, 0x4c,
   730  	0x10, 0x8d, 0xed, 0xfc, 0x4e, 0xda, 0x7e, 0xfd, 0x46, 0x08, 0x8c, 0x5b, 0x20, 0xb2, 0x54, 0x14,
   731  	0x90, 0x48, 0xaa, 0x50, 0x21, 0x7e, 0xae, 0x10, 0x0d, 0x95, 0x50, 0x0b, 0x62, 0xf9, 0xbb, 0x36,
   732  	0xf1, 0xa8, 0x58, 0x24, 0xb6, 0xd9, 0xdd, 0x46, 0xca, 0x3b, 0x20, 0xf1, 0x04, 0xbc, 0x0d, 0x4f,
   733  	0xc1, 0xd3, 0xa0, 0x5d, 0xef, 0x26, 0xa9, 0xea, 0x04, 0xa4, 0xc2, 0xdd, 0xcc, 0xee, 0x39, 0xb3,
   734  	0xb3, 0x67, 0xce, 0xda, 0xb0, 0xc7, 0xe9, 0x34, 0x11, 0x92, 0xcf, 0xfa, 0x82, 0xf8, 0x34, 0x19,
   735  	0x51, 0x3f, 0xe7, 0x99, 0xcc, 0xfa, 0x76, 0xb9, 0xa7, 0x53, 0xfc, 0xff, 0x34, 0xeb, 0x4d, 0x92,
   736  	0x11, 0xcf, 0x7a, 0x76, 0x23, 0xfc, 0xe9, 0x42, 0xe3, 0x4d, 0xc1, 0x41, 0x84, 0x6a, 0x1a, 0x4d,
   737  	0xc8, 0x77, 0x3a, 0x4e, 0xb7, 0xc5, 0x74, 0x8c, 0x3e, 0x34, 0xa6, 0xc4, 0x45, 0x92, 0xa5, 0xbe,
   738  	0xab, 0x97, 0x6d, 0x8a, 0x87, 0xd0, 0x9c, 0x90, 0x8c, 0xe2, 0x48, 0x46, 0xbe, 0xd7, 0xf1, 0xba,
   739  	0xed, 0x41, 0xb7, 0x77, 0xa1, 0x7e, 0xcf, 0xd4, 0xee, 0x9d, 0x18, 0xe8, 0x30, 0x95, 0x7c, 0xc6,
   740  	0xe6, 0x4c, 0x7c, 0x04, 0x2d, 0x4a, 0xe3, 0x3c, 0x4b, 0x52, 0x29, 0xfc, 0xaa, 0x2e, 0xb3, 0x53,
   741  	0x52, 0x66, 0x68, 0x30, 0x6c, 0x81, 0xc6, 0x7b, 0x50, 0x4b, 0xb3, 0x98, 0x84, 0x5f, 0xd3, 0xb4,
   742  	0x6b, 0x25, 0xb4, 0x97, 0x59, 0x4c, 0xac, 0x40, 0xe1, 0x01, 0x34, 0xb2, 0x5c, 0x26, 0x59, 0x2a,
   743  	0xfc, 0x7a, 0xc7, 0xe9, 0xb6, 0x07, 0x41, 0x09, 0xe1, 0x55, 0x81, 0x60, 0x16, 0x1a, 0x3c, 0x81,
   744  	0xcd, 0x73, 0xad, 0xe3, 0x36, 0x78, 0x9f, 0x69, 0x66, 0x34, 0x52, 0x21, 0x5e, 0x81, 0xda, 0x34,
   745  	0x1a, 0x9f, 0x91, 0x11, 0xa8, 0x48, 0x1e, 0xbb, 0x0f, 0x9d, 0xf0, 0x87, 0x03, 0x55, 0xd5, 0x02,
   746  	0x6e, 0x81, 0x9b, 0xc4, 0x86, 0xe3, 0x26, 0xb1, 0x52, 0x35, 0x8a, 0x63, 0x4e, 0x42, 0x58, 0x55,
   747  	0x4d, 0xaa, 0x66, 0x90, 0x67, 0x5c, 0xfa, 0x5e, 0xc7, 0xe9, 0x7a, 0x4c, 0xc7, 0xf8, 0x74, 0x49,
   748  	0xe9, 0x42, 0xa2, 0xbd, 0x15, 0x77, 0x5d, 0x25, 0xf3, 0xe5, 0xae, 0xf1, 0xd5, 0x85, 0xa6, 0x1d,
   749  	0x40, 0xa9, 0x49, 0x06, 0xd0, 0xe0, 0xf4, 0xe5, 0x8c, 0x84, 0xd4, 0xe4, 0xf6, 0xc0, 0x2f, 0xe9,
   750  	0xef, 0xbd, 0xaa, 0xc7, 0x2c, 0x10, 0x0f, 0xa0, 0xc9, 0x49, 0xe4, 0x59, 0x2a, 0x48, 0x5f, 0x76,
   751  	0x1d, 0x69, 0x8e, 0xc4, 0xe1, 0x05, 0x29, 0xee, 0xac, 0x71, 0xcb, 0xbf, 0x91, 0x23, 0x82, 0x9a,
   752  	0x6e, 0xab, 0x54, 0x0a, 0x84, 0xaa, 0x9c, 0xe5, 0x96, 0xa5, 0x63, 0xdc, 0x87, 0xba, 0x66, 0x0b,
   753  	0xf3, 0x4e, 0x56, 0x5f, 0xd4, 0xe0, 0xc2, 0x1d, 0x68, 0x18, 0x27, 0xaa, 0xce, 0xa4, 0x1c, 0xeb,
   754  	0x33, 0x3c, 0xa6, 0xc2, 0x50, 0x42, 0x9d, 0x91, 0x38, 0x1b, 0x4b, 0xbc, 0x0a, 0xf5, 0x68, 0xa4,
   755  	0x60, 0xa6, 0x05, 0x93, 0x29, 0xab, 0x9b, 0xef, 0x80, 0x99, 0x47, 0xb0, 0xfa, 0x65, 0x32, 0x0b,
   756  	0xc5, 0x5d, 0x68, 0xc9, 0x64, 0x42, 0x42, 0x46, 0x93, 0xdc, 0xf8, 0x6f, 0xb1, 0x10, 0xfe, 0x07,
   757  	0x9b, 0xc3, 0x49, 0x2e, 0x67, 0xcc, 0x8c, 0x22, 0xbc, 0x0d, 0x70, 0x44, 0x92, 0x99, 0x71, 0xfa,
   758  	0x8b, 0x23, 0x8b, 0x5e, 0x6c, 0x1a, 0x0e, 0xa1, 0xad, 0x71, 0x66, 0x82, 0x0f, 0xa0, 0x69, 0x76,
   759  	0x84, 0xef, 0x68, 0x39, 0xd6, 0x35, 0x37, 0xc7, 0x86, 0x9b, 0xd0, 0x3e, 0x4e, 0x84, 0x3d, 0x2f,
   760  	0x7c, 0x0e, 0x1b, 0x45, 0x7a, 0xc9, 0xb2, 0x5d, 0xd8, 0xf8, 0x10, 0xc9, 0xd1, 0xa7, 0xdf, 0xdf,
   761  	0xe3, 0xbb, 0x03, 0xb5, 0xe1, 0x94, 0x52, 0x79, 0xe1, 0x35, 0xef, 0x2f, 0xcd, 0x7c, 0x6b, 0xb0,
   762  	0x5b, 0x66, 0x48, 0xc5, 0x7b, 0x3b, 0xcb, 0xc9, 0x38, 0x62, 0xad, 0xd4, 0xcb, 0xe3, 0xab, 0xfe,
   763  	0xf1, 0xf8, 0xee, 0xf6, 0xa1, 0x35, 0x3f, 0x06, 0x01, 0xea, 0xcf, 0x38, 0x45, 0x92, 0xb6, 0x2b,
   764  	0x2a, 0x3e, 0xa4, 0x31, 0x49, 0xda, 0x76, 0x54, 0xfc, 0x2e, 0x8f, 0xd5, 0xba, 0x3b, 0xf8, 0xe6,
   765  	0x41, 0x93, 0x99, 0x72, 0x78, 0xa2, 0xa7, 0x69, 0xff, 0x04, 0x37, 0x4a, 0x0e, 0x5c, 0x0c, 0x3b,
   766  	0xb8, 0xb9, 0x6a, 0xdb, 0x58, 0xa3, 0x82, 0x2f, 0x6c, 0x69, 0xe2, 0xb8, 0xa6, 0xfb, 0xa0, 0x53,
   767  	0x26, 0xd6, 0x39, 0x9b, 0x55, 0xf0, 0x18, 0xe0, 0x90, 0xf8, 0xdf, 0xaa, 0xf6, 0xba, 0x30, 0x8e,
   768  	0xa1, 0x08, 0x2c, 0xbb, 0xcb, 0x92, 0xd1, 0x82, 0x5b, 0x2b, 0xf7, 0xe7, 0x25, 0x8f, 0xa0, 0xa6,
   769  	0x3d, 0x84, 0x65, 0xd8, 0x65, 0x77, 0x05, 0xd7, 0x4b, 0x00, 0xc5, 0x5b, 0x0e, 0x2b, 0xfb, 0xce,
   770  	0xc7, 0xba, 0xfe, 0x4d, 0xdf, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0xc6, 0xa5, 0x5a, 0xc9, 0xcf,
   771  	0x07, 0x00, 0x00,
   772  }
   773  
   774  // Reference imports to suppress errors if they are not otherwise used.
   775  var _ context.Context
   776  var _ grpc.ClientConn
   777  
   778  // This is a compile-time assertion to ensure that this generated file
   779  // is compatible with the grpc package it is being compiled against.
   780  const _ = grpc.SupportPackageIsVersion4
   781  
   782  // RegistryClient is the client API for Registry service.
   783  //
   784  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   785  type RegistryClient interface {
   786  	GetService(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
   787  	Register(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error)
   788  	Deregister(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error)
   789  	ListServices(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
   790  	Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Registry_WatchClient, error)
   791  }
   792  
   793  type registryClient struct {
   794  	cc *grpc.ClientConn
   795  }
   796  
   797  func NewRegistryClient(cc *grpc.ClientConn) RegistryClient {
   798  	return &registryClient{cc}
   799  }
   800  
   801  func (c *registryClient) GetService(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
   802  	out := new(GetResponse)
   803  	err := c.cc.Invoke(ctx, "/go.micro.registry.Registry/GetService", in, out, opts...)
   804  	if err != nil {
   805  		return nil, err
   806  	}
   807  	return out, nil
   808  }
   809  
   810  func (c *registryClient) Register(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) {
   811  	out := new(EmptyResponse)
   812  	err := c.cc.Invoke(ctx, "/go.micro.registry.Registry/Register", in, out, opts...)
   813  	if err != nil {
   814  		return nil, err
   815  	}
   816  	return out, nil
   817  }
   818  
   819  func (c *registryClient) Deregister(ctx context.Context, in *Service, opts ...grpc.CallOption) (*EmptyResponse, error) {
   820  	out := new(EmptyResponse)
   821  	err := c.cc.Invoke(ctx, "/go.micro.registry.Registry/Deregister", in, out, opts...)
   822  	if err != nil {
   823  		return nil, err
   824  	}
   825  	return out, nil
   826  }
   827  
   828  func (c *registryClient) ListServices(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
   829  	out := new(ListResponse)
   830  	err := c.cc.Invoke(ctx, "/go.micro.registry.Registry/ListServices", in, out, opts...)
   831  	if err != nil {
   832  		return nil, err
   833  	}
   834  	return out, nil
   835  }
   836  
   837  func (c *registryClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Registry_WatchClient, error) {
   838  	stream, err := c.cc.NewStream(ctx, &_Registry_serviceDesc.Streams[0], "/go.micro.registry.Registry/Watch", opts...)
   839  	if err != nil {
   840  		return nil, err
   841  	}
   842  	x := &registryWatchClient{stream}
   843  	if err := x.ClientStream.SendMsg(in); err != nil {
   844  		return nil, err
   845  	}
   846  	if err := x.ClientStream.CloseSend(); err != nil {
   847  		return nil, err
   848  	}
   849  	return x, nil
   850  }
   851  
   852  type Registry_WatchClient interface {
   853  	Recv() (*Result, error)
   854  	grpc.ClientStream
   855  }
   856  
   857  type registryWatchClient struct {
   858  	grpc.ClientStream
   859  }
   860  
   861  func (x *registryWatchClient) Recv() (*Result, error) {
   862  	m := new(Result)
   863  	if err := x.ClientStream.RecvMsg(m); err != nil {
   864  		return nil, err
   865  	}
   866  	return m, nil
   867  }
   868  
   869  // RegistryServer is the server API for Registry service.
   870  type RegistryServer interface {
   871  	GetService(context.Context, *GetRequest) (*GetResponse, error)
   872  	Register(context.Context, *Service) (*EmptyResponse, error)
   873  	Deregister(context.Context, *Service) (*EmptyResponse, error)
   874  	ListServices(context.Context, *ListRequest) (*ListResponse, error)
   875  	Watch(*WatchRequest, Registry_WatchServer) error
   876  }
   877  
   878  // UnimplementedRegistryServer can be embedded to have forward compatible implementations.
   879  type UnimplementedRegistryServer struct {
   880  }
   881  
   882  func (*UnimplementedRegistryServer) GetService(ctx context.Context, req *GetRequest) (*GetResponse, error) {
   883  	return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented")
   884  }
   885  func (*UnimplementedRegistryServer) Register(ctx context.Context, req *Service) (*EmptyResponse, error) {
   886  	return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
   887  }
   888  func (*UnimplementedRegistryServer) Deregister(ctx context.Context, req *Service) (*EmptyResponse, error) {
   889  	return nil, status.Errorf(codes.Unimplemented, "method Deregister not implemented")
   890  }
   891  func (*UnimplementedRegistryServer) ListServices(ctx context.Context, req *ListRequest) (*ListResponse, error) {
   892  	return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented")
   893  }
   894  func (*UnimplementedRegistryServer) Watch(req *WatchRequest, srv Registry_WatchServer) error {
   895  	return status.Errorf(codes.Unimplemented, "method Watch not implemented")
   896  }
   897  
   898  func RegisterRegistryServer(s *grpc.Server, srv RegistryServer) {
   899  	s.RegisterService(&_Registry_serviceDesc, srv)
   900  }
   901  
   902  func _Registry_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   903  	in := new(GetRequest)
   904  	if err := dec(in); err != nil {
   905  		return nil, err
   906  	}
   907  	if interceptor == nil {
   908  		return srv.(RegistryServer).GetService(ctx, in)
   909  	}
   910  	info := &grpc.UnaryServerInfo{
   911  		Server:     srv,
   912  		FullMethod: "/go.micro.registry.Registry/GetService",
   913  	}
   914  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   915  		return srv.(RegistryServer).GetService(ctx, req.(*GetRequest))
   916  	}
   917  	return interceptor(ctx, in, info, handler)
   918  }
   919  
   920  func _Registry_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   921  	in := new(Service)
   922  	if err := dec(in); err != nil {
   923  		return nil, err
   924  	}
   925  	if interceptor == nil {
   926  		return srv.(RegistryServer).Register(ctx, in)
   927  	}
   928  	info := &grpc.UnaryServerInfo{
   929  		Server:     srv,
   930  		FullMethod: "/go.micro.registry.Registry/Register",
   931  	}
   932  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   933  		return srv.(RegistryServer).Register(ctx, req.(*Service))
   934  	}
   935  	return interceptor(ctx, in, info, handler)
   936  }
   937  
   938  func _Registry_Deregister_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   939  	in := new(Service)
   940  	if err := dec(in); err != nil {
   941  		return nil, err
   942  	}
   943  	if interceptor == nil {
   944  		return srv.(RegistryServer).Deregister(ctx, in)
   945  	}
   946  	info := &grpc.UnaryServerInfo{
   947  		Server:     srv,
   948  		FullMethod: "/go.micro.registry.Registry/Deregister",
   949  	}
   950  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   951  		return srv.(RegistryServer).Deregister(ctx, req.(*Service))
   952  	}
   953  	return interceptor(ctx, in, info, handler)
   954  }
   955  
   956  func _Registry_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   957  	in := new(ListRequest)
   958  	if err := dec(in); err != nil {
   959  		return nil, err
   960  	}
   961  	if interceptor == nil {
   962  		return srv.(RegistryServer).ListServices(ctx, in)
   963  	}
   964  	info := &grpc.UnaryServerInfo{
   965  		Server:     srv,
   966  		FullMethod: "/go.micro.registry.Registry/ListServices",
   967  	}
   968  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   969  		return srv.(RegistryServer).ListServices(ctx, req.(*ListRequest))
   970  	}
   971  	return interceptor(ctx, in, info, handler)
   972  }
   973  
   974  func _Registry_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
   975  	m := new(WatchRequest)
   976  	if err := stream.RecvMsg(m); err != nil {
   977  		return err
   978  	}
   979  	return srv.(RegistryServer).Watch(m, &registryWatchServer{stream})
   980  }
   981  
   982  type Registry_WatchServer interface {
   983  	Send(*Result) error
   984  	grpc.ServerStream
   985  }
   986  
   987  type registryWatchServer struct {
   988  	grpc.ServerStream
   989  }
   990  
   991  func (x *registryWatchServer) Send(m *Result) error {
   992  	return x.ServerStream.SendMsg(m)
   993  }
   994  
   995  var _Registry_serviceDesc = grpc.ServiceDesc{
   996  	ServiceName: "go.micro.registry.Registry",
   997  	HandlerType: (*RegistryServer)(nil),
   998  	Methods: []grpc.MethodDesc{
   999  		{
  1000  			MethodName: "GetService",
  1001  			Handler:    _Registry_GetService_Handler,
  1002  		},
  1003  		{
  1004  			MethodName: "Register",
  1005  			Handler:    _Registry_Register_Handler,
  1006  		},
  1007  		{
  1008  			MethodName: "Deregister",
  1009  			Handler:    _Registry_Deregister_Handler,
  1010  		},
  1011  		{
  1012  			MethodName: "ListServices",
  1013  			Handler:    _Registry_ListServices_Handler,
  1014  		},
  1015  	},
  1016  	Streams: []grpc.StreamDesc{
  1017  		{
  1018  			StreamName:    "Watch",
  1019  			Handler:       _Registry_Watch_Handler,
  1020  			ServerStreams: true,
  1021  		},
  1022  	},
  1023  	Metadata: "registry/service/proto/registry.proto",
  1024  }