168 lines
7.0 KiB
Go
168 lines
7.0 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
// - protoc (unknown)
|
|
// source: cosmos/streaming/v1/grpc.proto
|
|
|
|
package streamingv1
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
ListenerService_ListenDeliverBlock_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock"
|
|
ListenerService_ListenStateChanges_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenStateChanges"
|
|
)
|
|
|
|
// ListenerServiceClient is the client API for ListenerService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
//
|
|
// ListenerService is the service for the Listener interface
|
|
type ListenerServiceClient interface {
|
|
// ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock
|
|
ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error)
|
|
// ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges
|
|
ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error)
|
|
}
|
|
|
|
type listenerServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewListenerServiceClient(cc grpc.ClientConnInterface) ListenerServiceClient {
|
|
return &listenerServiceClient{cc}
|
|
}
|
|
|
|
func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListenDeliverBlockResponse)
|
|
err := c.cc.Invoke(ctx, ListenerService_ListenDeliverBlock_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListenStateChangesResponse)
|
|
err := c.cc.Invoke(ctx, ListenerService_ListenStateChanges_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ListenerServiceServer is the server API for ListenerService service.
|
|
// All implementations must embed UnimplementedListenerServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// ListenerService is the service for the Listener interface
|
|
type ListenerServiceServer interface {
|
|
// ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock
|
|
ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error)
|
|
// ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges
|
|
ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error)
|
|
mustEmbedUnimplementedListenerServiceServer()
|
|
}
|
|
|
|
// UnimplementedListenerServiceServer must be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedListenerServiceServer struct{}
|
|
|
|
func (UnimplementedListenerServiceServer) ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented")
|
|
}
|
|
func (UnimplementedListenerServiceServer) ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented")
|
|
}
|
|
func (UnimplementedListenerServiceServer) mustEmbedUnimplementedListenerServiceServer() {}
|
|
func (UnimplementedListenerServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeListenerServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ListenerServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeListenerServiceServer interface {
|
|
mustEmbedUnimplementedListenerServiceServer()
|
|
}
|
|
|
|
func RegisterListenerServiceServer(s grpc.ServiceRegistrar, srv ListenerServiceServer) {
|
|
// If the following call pancis, it indicates UnimplementedListenerServiceServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&ListenerService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListenDeliverBlockRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ListenerService_ListenDeliverBlock_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListenStateChangesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ListenerServiceServer).ListenStateChanges(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ListenerService_ListenStateChanges_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ListenerService_ServiceDesc is the grpc.ServiceDesc for ListenerService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ListenerService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "cosmos.streaming.v1.ListenerService",
|
|
HandlerType: (*ListenerServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ListenDeliverBlock",
|
|
Handler: _ListenerService_ListenDeliverBlock_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListenStateChanges",
|
|
Handler: _ListenerService_ListenStateChanges_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "cosmos/streaming/v1/grpc.proto",
|
|
}
|