v1

package
v0.0.0-...-396e1d8 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_v1_snowflake_proto protoreflect.FileDescriptor
View Source
var SnowflakeID_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "SnowflakeID",
	HandlerType: (*SnowflakeIDServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "nextID",
			Handler:    _SnowflakeID_NextID_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "nextMultipleIDs",
			Handler:       _SnowflakeID_NextMultipleIDs_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/v1/snowflake.proto",
}

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

Functions

func RegisterSnowflakeIDServer

func RegisterSnowflakeIDServer(s grpc.ServiceRegistrar, srv SnowflakeIDServer)

Types

type IDResponse

type IDResponse struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*IDResponse) Descriptor deprecated

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

Deprecated: Use IDResponse.ProtoReflect.Descriptor instead.

func (*IDResponse) GetId

func (x *IDResponse) GetId() int64

func (*IDResponse) ProtoMessage

func (*IDResponse) ProtoMessage()

func (*IDResponse) ProtoReflect

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

func (*IDResponse) Reset

func (x *IDResponse) Reset()

func (*IDResponse) String

func (x *IDResponse) String() string

type SnowflakeIDClient

type SnowflakeIDClient interface {
	NextID(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*IDResponse, error)
	NextMultipleIDs(ctx context.Context, in *wrapperspb.UInt32Value, opts ...grpc.CallOption) (SnowflakeID_NextMultipleIDsClient, error)
}

SnowflakeIDClient is the client API for SnowflakeID 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 SnowflakeIDServer

type SnowflakeIDServer interface {
	NextID(context.Context, *emptypb.Empty) (*IDResponse, error)
	NextMultipleIDs(*wrapperspb.UInt32Value, SnowflakeID_NextMultipleIDsServer) error
	// contains filtered or unexported methods
}

SnowflakeIDServer is the server API for SnowflakeID service. All implementations must embed UnimplementedSnowflakeIDServer for forward compatibility

type SnowflakeID_NextMultipleIDsClient

type SnowflakeID_NextMultipleIDsClient interface {
	Recv() (*IDResponse, error)
	grpc.ClientStream
}

type SnowflakeID_NextMultipleIDsServer

type SnowflakeID_NextMultipleIDsServer interface {
	Send(*IDResponse) error
	grpc.ServerStream
}

type UnimplementedSnowflakeIDServer

type UnimplementedSnowflakeIDServer struct {
}

UnimplementedSnowflakeIDServer must be embedded to have forward compatible implementations.

func (UnimplementedSnowflakeIDServer) NextID

func (UnimplementedSnowflakeIDServer) NextMultipleIDs

type UnsafeSnowflakeIDServer

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

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

Jump to

Keyboard shortcuts

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