pb

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_github_com_dipdup_net_indexer_sdk_examples_grpc_proto_time_proto protoreflect.FileDescriptor
View Source
var TimeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.TimeService",
	HandlerType: (*TimeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UnsubscribeFromTime",
			Handler:    _TimeService_UnsubscribeFromTime_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "SubscribeOnTime",
			Handler:       _TimeService_SubscribeOnTime_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "github.com/dipdup-net/indexer-sdk/examples/grpc/proto/time.proto",
}

TimeService_ServiceDesc is the grpc.ServiceDesc for TimeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTimeServiceServer

func RegisterTimeServiceServer(s grpc.ServiceRegistrar, srv TimeServiceServer)

Types

type Request

type Request struct {
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Response *pb.SubscribeResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	Time     string                `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetResponse

func (x *Response) GetResponse() *pb.SubscribeResponse

func (*Response) GetTime

func (x *Response) GetTime() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type TimeServiceClient

type TimeServiceClient interface {
	SubscribeOnTime(ctx context.Context, in *Request, opts ...grpc.CallOption) (TimeService_SubscribeOnTimeClient, error)
	UnsubscribeFromTime(ctx context.Context, in *pb.UnsubscribeRequest, opts ...grpc.CallOption) (*pb.UnsubscribeResponse, error)
}

TimeServiceClient is the client API for TimeService 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.

type TimeServiceServer

type TimeServiceServer interface {
	SubscribeOnTime(*Request, TimeService_SubscribeOnTimeServer) error
	UnsubscribeFromTime(context.Context, *pb.UnsubscribeRequest) (*pb.UnsubscribeResponse, error)
	// contains filtered or unexported methods
}

TimeServiceServer is the server API for TimeService service. All implementations must embed UnimplementedTimeServiceServer for forward compatibility

type TimeService_SubscribeOnTimeClient

type TimeService_SubscribeOnTimeClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type TimeService_SubscribeOnTimeServer

type TimeService_SubscribeOnTimeServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type UnimplementedTimeServiceServer

type UnimplementedTimeServiceServer struct {
}

UnimplementedTimeServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTimeServiceServer) SubscribeOnTime

func (UnimplementedTimeServiceServer) UnsubscribeFromTime

type UnsafeTimeServiceServer

type UnsafeTimeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTimeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TimeServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL