github.com/decred/dcrlnd@v0.7.6/lnrpc/initchainsyncrpc/initchainsync.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.31.0
     4  // 	protoc        v3.4.0
     5  // source: initchainsyncrpc/initchainsync.proto
     6  
     7  package initchainsyncrpc
     8  
     9  import (
    10  	context "context"
    11  	grpc "google.golang.org/grpc"
    12  	codes "google.golang.org/grpc/codes"
    13  	status "google.golang.org/grpc/status"
    14  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    15  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    16  	reflect "reflect"
    17  	sync "sync"
    18  )
    19  
    20  const (
    21  	// Verify that this generated code is sufficiently up-to-date.
    22  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    23  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    24  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    25  )
    26  
    27  type ChainSyncSubscription struct {
    28  	state         protoimpl.MessageState
    29  	sizeCache     protoimpl.SizeCache
    30  	unknownFields protoimpl.UnknownFields
    31  }
    32  
    33  func (x *ChainSyncSubscription) Reset() {
    34  	*x = ChainSyncSubscription{}
    35  	if protoimpl.UnsafeEnabled {
    36  		mi := &file_initchainsyncrpc_initchainsync_proto_msgTypes[0]
    37  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    38  		ms.StoreMessageInfo(mi)
    39  	}
    40  }
    41  
    42  func (x *ChainSyncSubscription) String() string {
    43  	return protoimpl.X.MessageStringOf(x)
    44  }
    45  
    46  func (*ChainSyncSubscription) ProtoMessage() {}
    47  
    48  func (x *ChainSyncSubscription) ProtoReflect() protoreflect.Message {
    49  	mi := &file_initchainsyncrpc_initchainsync_proto_msgTypes[0]
    50  	if protoimpl.UnsafeEnabled && x != nil {
    51  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    52  		if ms.LoadMessageInfo() == nil {
    53  			ms.StoreMessageInfo(mi)
    54  		}
    55  		return ms
    56  	}
    57  	return mi.MessageOf(x)
    58  }
    59  
    60  // Deprecated: Use ChainSyncSubscription.ProtoReflect.Descriptor instead.
    61  func (*ChainSyncSubscription) Descriptor() ([]byte, []int) {
    62  	return file_initchainsyncrpc_initchainsync_proto_rawDescGZIP(), []int{0}
    63  }
    64  
    65  type ChainSyncUpdate struct {
    66  	state         protoimpl.MessageState
    67  	sizeCache     protoimpl.SizeCache
    68  	unknownFields protoimpl.UnknownFields
    69  
    70  	BlockHeight    int64  `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
    71  	BlockHash      []byte `protobuf:"bytes,2,opt,name=block_hash,json=blockHash,proto3" json:"block_hash,omitempty"`
    72  	BlockTimestamp int64  `protobuf:"varint,3,opt,name=block_timestamp,json=blockTimestamp,proto3" json:"block_timestamp,omitempty"`
    73  	Synced         bool   `protobuf:"varint,4,opt,name=synced,proto3" json:"synced,omitempty"`
    74  }
    75  
    76  func (x *ChainSyncUpdate) Reset() {
    77  	*x = ChainSyncUpdate{}
    78  	if protoimpl.UnsafeEnabled {
    79  		mi := &file_initchainsyncrpc_initchainsync_proto_msgTypes[1]
    80  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    81  		ms.StoreMessageInfo(mi)
    82  	}
    83  }
    84  
    85  func (x *ChainSyncUpdate) String() string {
    86  	return protoimpl.X.MessageStringOf(x)
    87  }
    88  
    89  func (*ChainSyncUpdate) ProtoMessage() {}
    90  
    91  func (x *ChainSyncUpdate) ProtoReflect() protoreflect.Message {
    92  	mi := &file_initchainsyncrpc_initchainsync_proto_msgTypes[1]
    93  	if protoimpl.UnsafeEnabled && x != nil {
    94  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    95  		if ms.LoadMessageInfo() == nil {
    96  			ms.StoreMessageInfo(mi)
    97  		}
    98  		return ms
    99  	}
   100  	return mi.MessageOf(x)
   101  }
   102  
   103  // Deprecated: Use ChainSyncUpdate.ProtoReflect.Descriptor instead.
   104  func (*ChainSyncUpdate) Descriptor() ([]byte, []int) {
   105  	return file_initchainsyncrpc_initchainsync_proto_rawDescGZIP(), []int{1}
   106  }
   107  
   108  func (x *ChainSyncUpdate) GetBlockHeight() int64 {
   109  	if x != nil {
   110  		return x.BlockHeight
   111  	}
   112  	return 0
   113  }
   114  
   115  func (x *ChainSyncUpdate) GetBlockHash() []byte {
   116  	if x != nil {
   117  		return x.BlockHash
   118  	}
   119  	return nil
   120  }
   121  
   122  func (x *ChainSyncUpdate) GetBlockTimestamp() int64 {
   123  	if x != nil {
   124  		return x.BlockTimestamp
   125  	}
   126  	return 0
   127  }
   128  
   129  func (x *ChainSyncUpdate) GetSynced() bool {
   130  	if x != nil {
   131  		return x.Synced
   132  	}
   133  	return false
   134  }
   135  
   136  var File_initchainsyncrpc_initchainsync_proto protoreflect.FileDescriptor
   137  
   138  var file_initchainsyncrpc_initchainsync_proto_rawDesc = []byte{
   139  	0x0a, 0x24, 0x69, 0x6e, 0x69, 0x74, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x72,
   140  	0x70, 0x63, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x79, 0x6e, 0x63,
   141  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x63,
   142  	0x68, 0x61, 0x69, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x70, 0x63, 0x22, 0x17, 0x0a, 0x15, 0x43,
   143  	0x68, 0x61, 0x69, 0x6e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70,
   144  	0x74, 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x79,
   145  	0x6e, 0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63,
   146  	0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
   147  	0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x62,
   148  	0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
   149  	0x09, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x27, 0x0a, 0x0f, 0x62, 0x6c,
   150  	0x6f, 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20,
   151  	0x01, 0x28, 0x03, 0x52, 0x0e, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
   152  	0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x18, 0x04, 0x20,
   153  	0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x79, 0x6e, 0x63, 0x65, 0x64, 0x32, 0x7c, 0x0a, 0x10, 0x49,
   154  	0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x79, 0x6e, 0x63, 0x12,
   155  	0x68, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x43, 0x68, 0x61, 0x69,
   156  	0x6e, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x2a, 0x2e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x63,
   157  	0x68, 0x61, 0x69, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x69,
   158  	0x6e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
   159  	0x6e, 0x1a, 0x24, 0x2e, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x63, 0x68, 0x61, 0x69, 0x6e,
   160  	0x73, 0x79, 0x6e, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x53, 0x79, 0x6e,
   161  	0x63, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x30, 0x01, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74,
   162  	0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x63, 0x72, 0x65, 0x64, 0x2f, 0x64,
   163  	0x63, 0x72, 0x6c, 0x6e, 0x64, 0x2f, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2f, 0x69, 0x6e, 0x69, 0x74,
   164  	0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x79, 0x6e, 0x63, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72,
   165  	0x6f, 0x74, 0x6f, 0x33,
   166  }
   167  
   168  var (
   169  	file_initchainsyncrpc_initchainsync_proto_rawDescOnce sync.Once
   170  	file_initchainsyncrpc_initchainsync_proto_rawDescData = file_initchainsyncrpc_initchainsync_proto_rawDesc
   171  )
   172  
   173  func file_initchainsyncrpc_initchainsync_proto_rawDescGZIP() []byte {
   174  	file_initchainsyncrpc_initchainsync_proto_rawDescOnce.Do(func() {
   175  		file_initchainsyncrpc_initchainsync_proto_rawDescData = protoimpl.X.CompressGZIP(file_initchainsyncrpc_initchainsync_proto_rawDescData)
   176  	})
   177  	return file_initchainsyncrpc_initchainsync_proto_rawDescData
   178  }
   179  
   180  var file_initchainsyncrpc_initchainsync_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   181  var file_initchainsyncrpc_initchainsync_proto_goTypes = []interface{}{
   182  	(*ChainSyncSubscription)(nil), // 0: initialchainsyncrpc.ChainSyncSubscription
   183  	(*ChainSyncUpdate)(nil),       // 1: initialchainsyncrpc.ChainSyncUpdate
   184  }
   185  var file_initchainsyncrpc_initchainsync_proto_depIdxs = []int32{
   186  	0, // 0: initialchainsyncrpc.InitialChainSync.SubscribeChainSync:input_type -> initialchainsyncrpc.ChainSyncSubscription
   187  	1, // 1: initialchainsyncrpc.InitialChainSync.SubscribeChainSync:output_type -> initialchainsyncrpc.ChainSyncUpdate
   188  	1, // [1:2] is the sub-list for method output_type
   189  	0, // [0:1] is the sub-list for method input_type
   190  	0, // [0:0] is the sub-list for extension type_name
   191  	0, // [0:0] is the sub-list for extension extendee
   192  	0, // [0:0] is the sub-list for field type_name
   193  }
   194  
   195  func init() { file_initchainsyncrpc_initchainsync_proto_init() }
   196  func file_initchainsyncrpc_initchainsync_proto_init() {
   197  	if File_initchainsyncrpc_initchainsync_proto != nil {
   198  		return
   199  	}
   200  	if !protoimpl.UnsafeEnabled {
   201  		file_initchainsyncrpc_initchainsync_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   202  			switch v := v.(*ChainSyncSubscription); i {
   203  			case 0:
   204  				return &v.state
   205  			case 1:
   206  				return &v.sizeCache
   207  			case 2:
   208  				return &v.unknownFields
   209  			default:
   210  				return nil
   211  			}
   212  		}
   213  		file_initchainsyncrpc_initchainsync_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   214  			switch v := v.(*ChainSyncUpdate); i {
   215  			case 0:
   216  				return &v.state
   217  			case 1:
   218  				return &v.sizeCache
   219  			case 2:
   220  				return &v.unknownFields
   221  			default:
   222  				return nil
   223  			}
   224  		}
   225  	}
   226  	type x struct{}
   227  	out := protoimpl.TypeBuilder{
   228  		File: protoimpl.DescBuilder{
   229  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   230  			RawDescriptor: file_initchainsyncrpc_initchainsync_proto_rawDesc,
   231  			NumEnums:      0,
   232  			NumMessages:   2,
   233  			NumExtensions: 0,
   234  			NumServices:   1,
   235  		},
   236  		GoTypes:           file_initchainsyncrpc_initchainsync_proto_goTypes,
   237  		DependencyIndexes: file_initchainsyncrpc_initchainsync_proto_depIdxs,
   238  		MessageInfos:      file_initchainsyncrpc_initchainsync_proto_msgTypes,
   239  	}.Build()
   240  	File_initchainsyncrpc_initchainsync_proto = out.File
   241  	file_initchainsyncrpc_initchainsync_proto_rawDesc = nil
   242  	file_initchainsyncrpc_initchainsync_proto_goTypes = nil
   243  	file_initchainsyncrpc_initchainsync_proto_depIdxs = nil
   244  }
   245  
   246  // Reference imports to suppress errors if they are not otherwise used.
   247  var _ context.Context
   248  var _ grpc.ClientConnInterface
   249  
   250  // This is a compile-time assertion to ensure that this generated file
   251  // is compatible with the grpc package it is being compiled against.
   252  const _ = grpc.SupportPackageIsVersion6
   253  
   254  // InitialChainSyncClient is the client API for InitialChainSync service.
   255  //
   256  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   257  type InitialChainSyncClient interface {
   258  	// SubscribeChainSync is a streaming call that registers a client to receive
   259  	// updates about the progress of the sync procedure. If an update message is
   260  	// received with synced = true, then this will be the last update sent and
   261  	// the server will be shutdown.
   262  	SubscribeChainSync(ctx context.Context, in *ChainSyncSubscription, opts ...grpc.CallOption) (InitialChainSync_SubscribeChainSyncClient, error)
   263  }
   264  
   265  type initialChainSyncClient struct {
   266  	cc grpc.ClientConnInterface
   267  }
   268  
   269  func NewInitialChainSyncClient(cc grpc.ClientConnInterface) InitialChainSyncClient {
   270  	return &initialChainSyncClient{cc}
   271  }
   272  
   273  func (c *initialChainSyncClient) SubscribeChainSync(ctx context.Context, in *ChainSyncSubscription, opts ...grpc.CallOption) (InitialChainSync_SubscribeChainSyncClient, error) {
   274  	stream, err := c.cc.NewStream(ctx, &_InitialChainSync_serviceDesc.Streams[0], "/initialchainsyncrpc.InitialChainSync/SubscribeChainSync", opts...)
   275  	if err != nil {
   276  		return nil, err
   277  	}
   278  	x := &initialChainSyncSubscribeChainSyncClient{stream}
   279  	if err := x.ClientStream.SendMsg(in); err != nil {
   280  		return nil, err
   281  	}
   282  	if err := x.ClientStream.CloseSend(); err != nil {
   283  		return nil, err
   284  	}
   285  	return x, nil
   286  }
   287  
   288  type InitialChainSync_SubscribeChainSyncClient interface {
   289  	Recv() (*ChainSyncUpdate, error)
   290  	grpc.ClientStream
   291  }
   292  
   293  type initialChainSyncSubscribeChainSyncClient struct {
   294  	grpc.ClientStream
   295  }
   296  
   297  func (x *initialChainSyncSubscribeChainSyncClient) Recv() (*ChainSyncUpdate, error) {
   298  	m := new(ChainSyncUpdate)
   299  	if err := x.ClientStream.RecvMsg(m); err != nil {
   300  		return nil, err
   301  	}
   302  	return m, nil
   303  }
   304  
   305  // InitialChainSyncServer is the server API for InitialChainSync service.
   306  type InitialChainSyncServer interface {
   307  	// SubscribeChainSync is a streaming call that registers a client to receive
   308  	// updates about the progress of the sync procedure. If an update message is
   309  	// received with synced = true, then this will be the last update sent and
   310  	// the server will be shutdown.
   311  	SubscribeChainSync(*ChainSyncSubscription, InitialChainSync_SubscribeChainSyncServer) error
   312  }
   313  
   314  // UnimplementedInitialChainSyncServer can be embedded to have forward compatible implementations.
   315  type UnimplementedInitialChainSyncServer struct {
   316  }
   317  
   318  func (*UnimplementedInitialChainSyncServer) SubscribeChainSync(*ChainSyncSubscription, InitialChainSync_SubscribeChainSyncServer) error {
   319  	return status.Errorf(codes.Unimplemented, "method SubscribeChainSync not implemented")
   320  }
   321  
   322  func RegisterInitialChainSyncServer(s *grpc.Server, srv InitialChainSyncServer) {
   323  	s.RegisterService(&_InitialChainSync_serviceDesc, srv)
   324  }
   325  
   326  func _InitialChainSync_SubscribeChainSync_Handler(srv interface{}, stream grpc.ServerStream) error {
   327  	m := new(ChainSyncSubscription)
   328  	if err := stream.RecvMsg(m); err != nil {
   329  		return err
   330  	}
   331  	return srv.(InitialChainSyncServer).SubscribeChainSync(m, &initialChainSyncSubscribeChainSyncServer{stream})
   332  }
   333  
   334  type InitialChainSync_SubscribeChainSyncServer interface {
   335  	Send(*ChainSyncUpdate) error
   336  	grpc.ServerStream
   337  }
   338  
   339  type initialChainSyncSubscribeChainSyncServer struct {
   340  	grpc.ServerStream
   341  }
   342  
   343  func (x *initialChainSyncSubscribeChainSyncServer) Send(m *ChainSyncUpdate) error {
   344  	return x.ServerStream.SendMsg(m)
   345  }
   346  
   347  var _InitialChainSync_serviceDesc = grpc.ServiceDesc{
   348  	ServiceName: "initialchainsyncrpc.InitialChainSync",
   349  	HandlerType: (*InitialChainSyncServer)(nil),
   350  	Methods:     []grpc.MethodDesc{},
   351  	Streams: []grpc.StreamDesc{
   352  		{
   353  			StreamName:    "SubscribeChainSync",
   354  			Handler:       _InitialChainSync_SubscribeChainSync_Handler,
   355  			ServerStreams: true,
   356  		},
   357  	},
   358  	Metadata: "initchainsyncrpc/initchainsync.proto",
   359  }